Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 90 | public function getNode(): BaseToken |
|
17 | { |
||
18 | 90 | $current = $this->tokenStream->getVariable( |
|
19 | 90 | $this->getCurrentNode()->getValue() |
|
20 | ); |
||
21 | 86 | $current->setStack($this->tokenStream->getStack()); |
|
22 | |||
23 | 86 | while ($this->hasMethodCall()) { |
|
24 | 32 | $current = $this->getMethod($current)->call(...$this->getArguments()); |
|
|
|||
25 | } |
||
26 | |||
27 | 86 | return $current; |
|
28 | } |
||
29 | } |
||
30 |
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: