Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
13 | public function testPostWorkspaceCheck() { |
||
14 | $blob = $this->testPostWorkspacePart(); |
||
15 | $id = $blob[0]; |
||
16 | $part_id = $blob[1]; |
||
17 | |||
18 | $client = $this->createClient(); |
||
19 | $client = $this->logIn2($client); |
||
20 | $client->request( |
||
21 | 'POST', |
||
22 | '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
||
23 | [], |
||
24 | [], |
||
25 | ['CONTENT_TYPE' => 'application/json'], |
||
26 | ''); |
||
27 | $response = $client->getResponse(); |
||
|
|||
28 | $data = $client->getResponse()->getContent(); |
||
29 | |||
30 | $js = json_decode($data); |
||
31 | $points = $js->points; |
||
32 | |||
33 | $this->assertTrue(is_numeric($points)); //TODO verificare che il numero sia adeguato ai punti attesi |
||
34 | |||
35 | return [$id, $part_id]; |
||
36 | } |
||
37 | |||
60 |
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.