Conditions | 2 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.1481 |
Changes | 0 |
1 | <?php |
||
58 | 66 | public function __invoke(): bool |
|
59 | { |
||
60 | return $this->artisanCommand->task($this->title(), function () { |
||
61 | 66 | if ($this->artisanCommand->getOutput()->isVerbose()) { |
|
62 | $this->artisanCommand->getOutput()->newLine(); |
||
63 | |||
64 | return ! $this->artisanCommand->call($this->command, $this->arguments); |
||
65 | } |
||
66 | |||
67 | 66 | return ! $this->artisanCommand->callSilent($this->command, $this->arguments); |
|
68 | 66 | }); |
|
69 | } |
||
70 | } |
||
71 |
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.