| 1 | <?php |
||
| 9 | final class ApplicationConfigServiceProvider extends AbstractServiceProvider |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var ApplicationConfig |
||
| 13 | */ |
||
| 14 | private $config; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $prefix; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param ApplicationConfig $config |
||
| 23 | * @param string $prefix |
||
| 24 | */ |
||
| 25 | public function __construct(ApplicationConfig $config, $prefix) |
||
| 36 | |||
| 37 | public function register() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | private function keyPrefix() |
||
| 61 | } |
||
| 62 |
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.