Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 13 | public function pass(Expr\Assign $expr, Context $context) |
|
23 | { |
||
24 | 13 | if ($expr->var instanceof Expr\Variable && $expr->var->name instanceof Expr\Variable) { |
|
25 | 1 | $context->notice( |
|
26 | 1 | 'variable.dynamic_assignment', |
|
27 | 1 | 'Dynamic assignment is greatly discouraged.', |
|
28 | $expr |
||
29 | 1 | ); |
|
30 | |||
31 | 1 | return true; |
|
32 | } |
||
33 | |||
34 | 13 | return false; |
|
35 | } |
||
36 | |||
47 |