Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function pass(Expr\AssignRef $expr, Context $context) |
||
27 | { |
||
28 | if ($expr->expr instanceof Expr\New_) { |
||
29 | $context->notice( |
||
30 | 'assign_ref_new', |
||
31 | 'Do not use = & new, all objects in PHP are passed by reference', |
||
32 | $expr |
||
33 | ); |
||
34 | |||
35 | return true; |
||
36 | } |
||
37 | |||
38 | return false; |
||
39 | } |
||
40 | |||
50 | } |