Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function initCompiler() |
||
15 | { |
||
16 | $compiler = $this->getCompiler(); |
||
|
|||
17 | |||
18 | $compiler->addFunction('helper', function () { |
||
19 | return '$this->helper'; |
||
20 | }); |
||
21 | $compiler->addFunction('translate', function ($resolvedArgs) { |
||
22 | return '$this->helper->translate(\'.$resolvedArgs.\')'; |
||
23 | }); |
||
24 | $compiler->addFunction('langUrl', function ($resolvedArgs) { |
||
25 | return '$this->helper->langUrl(' . $resolvedArgs . ')'; |
||
26 | }); |
||
27 | $compiler->addFunction('image', function ($resolvedArgs) { |
||
28 | return '(new \Image\Storage(' . $resolvedArgs . '))'; |
||
29 | }); |
||
30 | $compiler->addFunction('widget', function ($resolvedArgs) { |
||
31 | return '(new \Application\Widget\Proxy(' . $resolvedArgs . '))'; |
||
32 | }); |
||
33 | |||
34 | $compiler->addFunction('substr', 'substr'); |
||
35 | |||
36 | } |
||
37 | |||
39 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.