Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
48 | 3 | public function renderSlideHtml($tag, $index) |
|
49 | { |
||
50 | 3 | $content = $this->value; |
|
|
|||
51 | 3 | if ($this->value instanceof Closure) { |
|
52 | 3 | $content = call_user_func($this->value, $tag, $index, $this); |
|
53 | 1 | } else { |
|
54 | 3 | $content = $this->value; |
|
55 | } |
||
56 | |||
57 | 3 | $options = $this->options; |
|
58 | |||
59 | 3 | return Html::tag($tag, $content, $options); |
|
60 | } |
||
61 | } |
||
62 |
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.