Conditions | 1 |
Paths | 1 |
Total Lines | 22 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
55 | protected function getStub($name) |
||
56 | { |
||
57 | $namespace = Container::getInstance()->getNamespace(); |
||
58 | |||
59 | $namespace = $namespace.'LangBundler\\Mods'; |
||
60 | |||
61 | $stub = $this->filesystem->get(__DIR__.'/../BundleItems/ModStub.php'); |
||
62 | |||
63 | $stub = str_replace( |
||
64 | 'LaravelLangBundler\BundleItems', |
||
65 | $namespace, |
||
66 | $stub |
||
67 | ); |
||
68 | |||
69 | $stub = str_replace( |
||
70 | 'ModStub', |
||
71 | $name, |
||
72 | $stub |
||
73 | ); |
||
74 | |||
75 | return $stub; |
||
76 | } |
||
77 | } |
||
78 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.