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