| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public static function getIcon($status){ |
||
| 11 | $icon=""; |
||
|
|
|||
| 12 | switch ($status){ |
||
| 13 | case self::$UNTRACKED: |
||
| 14 | $icon="blue question"; |
||
| 15 | break; |
||
| 16 | case self::$MODIFIED: |
||
| 17 | $icon="green edit"; |
||
| 18 | break; |
||
| 19 | case self::$DELETED: |
||
| 20 | $icon="red remove"; |
||
| 21 | break; |
||
| 22 | default: |
||
| 23 | $icon="red question"; |
||
| 24 | break; |
||
| 25 | } |
||
| 26 | return $icon; |
||
| 27 | } |
||
| 28 | } |
||
| 30 |
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.