| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | protected function updateContent(ManialinkInterface $manialink) |
||
| 35 | { |
||
| 36 | |||
| 37 | $this->memoryMessage->setText(Test::$memoryMsg); |
||
| 38 | $now = uniqid("exp2"); |
||
|
|
|||
| 39 | |||
| 40 | $message = "Time now:".date("h:i:s"); |
||
| 41 | |||
| 42 | |||
| 43 | |||
| 44 | |||
| 45 | $hash = self::$exp_hash; |
||
| 46 | |||
| 47 | $script = new Script(); |
||
| 48 | $script->addCustomScriptLabel(ScriptLabel::OnInit, |
||
| 49 | ' |
||
| 50 | declare Text '.$hash.' for LocalUser = Text; |
||
| 51 | '.$hash.' = "'.$message.'"; |
||
| 52 | declare Text '.$hash.'_check for LocalUser = ""; |
||
| 53 | '.$hash.'_check = "$now"; |
||
| 54 | ' |
||
| 55 | ); |
||
| 56 | $manialink->getFmlManialink()->setScript($script); |
||
| 57 | } |
||
| 58 | |||
| 60 |
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.