1 | <?php declare(strict_types=1); |
||
22 | class ParametersList implements ParametersListInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | private $number_of_parameters = 0; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $number_of_required_parameters = 0; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $variadic = false; |
||
38 | |||
39 | /** |
||
40 | * @var Parameters\ParameterSpecInterface[] |
||
41 | */ |
||
42 | private $parameters; |
||
43 | |||
44 | // TODO: constructor should accept all props by value, not guess them all |
||
45 | |||
46 | /** |
||
47 | * @param Parameters\ParameterSpecInterface[] ...$parameters |
||
48 | */ |
||
49 | public function __construct(ParameterSpecInterface ...$parameters) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function getNumberOfParameters(): int |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getNumberOfRequiredParameters(): int |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function isVariadic(): bool |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function getParameters(): array |
||
89 | |||
90 | /** |
||
91 | * @param Parameters\ParameterSpecInterface[] ...$parameters |
||
92 | * |
||
93 | * @return int |
||
94 | */ |
||
95 | protected function getNumberOfParametersFromArray(array $parameters): int |
||
99 | |||
100 | /** |
||
101 | * @param Parameters\ParameterSpecInterface[] ...$parameters |
||
102 | * |
||
103 | * @return int |
||
104 | */ |
||
105 | protected function getNumberOfRequiredParametersFromArray(array $parameters): int |
||
119 | |||
120 | /** |
||
121 | * @param Parameters\ParameterSpecInterface[] ...$parameters |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | protected function getIsVariadicFromArray(array $parameters): bool |
||
135 | } |
||
136 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..