| 1 | <?php |
||
| 24 | class RouterFactory implements FactoryInterface |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @todo - move this to a separate method() - consider how to inject custom-defined arbitrary chain router entries |
||
| 28 | * |
||
| 29 | * @param ServiceLocatorInterface $serviceLocator |
||
| 30 | * |
||
| 31 | * @throws \Exception |
||
| 32 | * |
||
| 33 | * @return ChainRouter |
||
| 34 | */ |
||
| 35 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
| 44 | } |
||
| 45 |
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.