Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
20 | 17 | public function pass(Class_ $classStmt, Context $context) |
|
21 | { |
||
22 | 17 | foreach ($classStmt->stmts as $statement) { |
|
23 | 17 | if (!($statement instanceof ClassMethod) || $statement->name !== $classStmt->name) { |
|
24 | 17 | continue; |
|
25 | } |
||
26 | 1 | $context->notice( |
|
27 | 1 | 'deprecated.constructor', |
|
28 | 1 | sprintf('Class %s uses a PHP4 constructor.', $classStmt->name), |
|
29 | $classStmt |
||
30 | 1 | ); |
|
31 | 1 | return true; |
|
32 | 17 | } |
|
33 | |||
34 | 17 | return false; |
|
35 | } |
||
36 | |||
60 |