Skip to content

Commit b49658a

Browse files
committed
fix invalid param
1 parent 70b1d8d commit b49658a

5 files changed

+6
-23
lines changed

phpstan-baseline.neon

-19
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,9 @@ parameters:
2020
count: 1
2121
path: src/AbstractFactoryInterface.php
2222

23-
-
24-
message: "#^PHPDoc tag @param has invalid value \\(\\$instance\\)\\: Unexpected token \"\\$instance\", expected type at offset 43$#"
25-
count: 1
26-
path: src/InitializerInterface.php
27-
28-
-
29-
message: "#^PHPDoc tag @param has invalid value \\(bool\\)\\: Unexpected token \"\\\\n \", expected variable at offset 89$#"
30-
count: 1
31-
path: src/ServiceManager.php
32-
3323
-
3424
message: "#^Closure invoked with 4 parameters, 0 required\\.$#"
3525
count: 1
3626
path: src/ServiceManager.php
3727

38-
-
39-
message: "#^PHPDoc tag @param has invalid value \\(\\$className\\)\\: Unexpected token \"\\$className\", expected type at offset 18$#"
40-
count: 1
41-
path: src/Tool/ConfigDumper.php
42-
43-
-
44-
message: "#^PHPDoc tag @param has invalid value \\(\\$className\\)\\: Unexpected token \"\\$className\", expected type at offset 18$#"
45-
count: 1
46-
path: src/Tool/FactoryCreator.php
4728

src/InitializerInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface InitializerInterface extends Initializer\InitializerInterface
3333
/**
3434
* Initialize
3535
*
36-
* @param $instance
36+
* @param object $instance
3737
* @param ServiceLocatorInterface $serviceLocator
3838
* @return mixed
3939
*/

src/ServiceManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class ServiceManager implements ServiceLocatorInterface
7070
/**
7171
* Whether or not changes may be made to this instance.
7272
*
73-
* @param bool
73+
* @var bool
7474
*/
7575
protected $allowOverride = false;
7676

src/Tool/ConfigDumper.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ function (ReflectionParameter $argument) {
123123
}
124124

125125
/**
126-
* @param $className
126+
* @param string $className
127+
* @psalm-param class-string $className
127128
* @throws InvalidArgumentException if class name is not a string or does
128129
* not exist.
129130
*/

src/Tool/FactoryCreator.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public function createFactory($className)
7777
}
7878

7979
/**
80-
* @param $className
80+
* @param string $className
81+
* @psalm-param class-string $className
8182
* @return string
8283
*/
8384
private function getClassName($className)

0 commit comments

Comments
 (0)