Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | public function enterNode(\PhpParser\Node $node) |
||
45 | { |
||
46 | if ($node instanceof String_ && '%?' === $node->value) { |
||
47 | $value = $this->args[++$this->offset] ?? null; |
||
48 | |||
49 | if (null === $value) { |
||
50 | throw new \ParseError('Unable to parse syntax "%?" as no value supplied for its string node expression.'); |
||
51 | } |
||
52 | |||
53 | return BuilderHelpers::normalizeValue($value); |
||
54 | } |
||
55 | |||
56 | return parent::enterNode($node); |
||
|
|||
57 | } |
||
59 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.