1 | <?php |
||
14 | class MethodCannotReturn implements Pass\AnalyzerPassInterface |
||
15 | { |
||
16 | use DefaultMetadataPassTrait; |
||
17 | use ResolveExpressionTrait; |
||
18 | |||
19 | const DESCRIPTION = 'Checks for return statements in `__construct` and `__destruct` since they can\'t return anything.'; |
||
20 | |||
21 | /** |
||
22 | * @param ClassMethod $methodStmt |
||
23 | * @param Context $context |
||
24 | * @return bool |
||
25 | */ |
||
26 | 12 | public function pass(ClassMethod $methodStmt, Context $context) |
|
56 | |||
57 | /** |
||
58 | * @return array |
||
59 | */ |
||
60 | 1 | public function getRegister() |
|
66 | } |
||
67 |