1 | <?php |
||
22 | class TypeHintNode extends Rule implements ProvidesName |
||
23 | { |
||
24 | use TypeNameProvider; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $modifiers = 0; |
||
30 | |||
31 | /** |
||
32 | * TypeHintNode constructor. |
||
33 | * @param string $name |
||
34 | * @param array $children |
||
35 | * @param int $offset |
||
36 | */ |
||
37 | 11 | public function __construct(string $name, array $children = [], int $offset = 0) |
|
53 | |||
54 | /** |
||
55 | * @param RuleInterface|NodeInterface $rule |
||
56 | * @return \Generator |
||
57 | */ |
||
58 | 11 | private function analyze(RuleInterface $rule): \Generator |
|
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function isList(): bool |
||
75 | |||
76 | /** |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function isNonNull(): bool |
||
83 | |||
84 | /** |
||
85 | * @return bool |
||
86 | */ |
||
87 | public function isListOfNonNulls(): bool |
||
91 | |||
92 | /** |
||
93 | * @return int |
||
94 | */ |
||
95 | 6 | public function getModifiers(): int |
|
99 | |||
100 | /** |
||
101 | * @return null|TypeNameNode|NodeInterface |
||
102 | */ |
||
103 | 6 | protected function getTypeNameNode(): ?TypeNameNode |
|
107 | } |
||
108 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: