| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 13 | final class DocCommentReplacement extends NodeVisitorAbstract |
||
| 14 | { |
||
| 15 | /** @var TypeMap */ |
||
| 16 | private $typeMap; |
||
| 17 | /** @var string[] */ |
||
| 18 | private $annotations; |
||
| 19 | |||
| 20 | public function __construct(TypeMap $typeMap, string ...$annotations) |
||
| 21 | { |
||
| 22 | $this->typeMap = $typeMap; |
||
| 23 | $this->annotations = $annotations; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function leaveNode(Node $node) |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
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.