| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 29 | public function __construct(array $data) |
||
| 30 | { |
||
| 31 | if (isset($data['text'])) { |
||
| 32 | $args = null; |
||
|
|
|||
| 33 | $command = $this->getCommandDataFromText($data['text']); |
||
| 34 | |||
| 35 | if ($command) { |
||
| 36 | $data = [ |
||
| 37 | 'name' => $command['name'], |
||
| 38 | 'args' => $command['args'] |
||
| 39 | ]; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | parent::__construct($data); |
||
| 44 | } |
||
| 45 | |||
| 84 |
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.