| 1 | <?php |
||
| 16 | class KanDefectVisitor extends NodeVisitorAbstract |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var Metrics |
||
| 20 | */ |
||
| 21 | private $metrics; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * ClassEnumVisitor constructor. |
||
| 25 | * @param Metrics $metrics |
||
| 26 | */ |
||
| 27 | public function __construct(Metrics $metrics) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | */ |
||
| 35 | public function leaveNode(Node $node) |
||
| 66 | } |
||
| 67 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.