Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function testSetInvalidDataTypeThrowsException() |
||
26 | { |
||
27 | $testInstance = new DataSeriesValues(); |
||
28 | |||
29 | try { |
||
30 | $result = $testInstance->setDataType('BOOLEAN'); |
||
|
|||
31 | } catch (Exception $e) { |
||
32 | $this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values'); |
||
33 | |||
34 | return; |
||
35 | } |
||
36 | $this->fail('An expected exception has not been raised.'); |
||
37 | } |
||
38 | |||
50 |
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.