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