| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function __construct(array $data) |
||
| 24 | { |
||
| 25 | $command = null; |
||
|
|
|||
| 26 | $args = null; |
||
| 27 | |||
| 28 | if (isset($data['text'])) { |
||
| 29 | $command = $this->getCommandFromText($data['text']); |
||
| 30 | |||
| 31 | if ($command) { |
||
| 32 | $args = $this->getArgsFromText($command, $data['text']); |
||
| 33 | } |
||
| 34 | |||
| 35 | $data = [ |
||
| 36 | 'name' => $command, |
||
| 37 | 'args' => $args |
||
| 38 | ]; |
||
| 39 | } |
||
| 40 | |||
| 41 | parent::__construct($data); |
||
| 42 | } |
||
| 43 | |||
| 92 |
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.