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