| 1 | <?php |
||
| 10 | class LimitNodeParser implements NodeParserInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var SubParserInterface |
||
| 14 | */ |
||
| 15 | protected $valueParser; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param SubParserInterface $valueParser |
||
| 19 | */ |
||
| 20 | 64 | public function __construct(SubParserInterface $valueParser) |
|
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritdoc |
||
| 27 | */ |
||
| 28 | 5 | public function parse(TokenStream $tokenStream) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @inheritdoc |
||
| 48 | */ |
||
| 49 | 6 | public function supports(TokenStream $tokenStream) |
|
| 53 | } |
||
| 54 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.