| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 38 | public function testDeletePostWorkspaceCheck() { |
||
| 39 | $blob = $this->testPostWorkspaceCheck(); |
||
| 40 | $id = $blob[0]; |
||
| 41 | $part_id = $blob[1]; |
||
| 42 | |||
| 43 | $client = $this->createClient(); |
||
| 44 | $client = $this->logIn2($client); |
||
| 45 | $client->request( |
||
| 46 | 'DELETE', |
||
| 47 | '/api/v1/workspace/'.$id.'/part/'.$part_id.'/checkin', |
||
| 48 | [], |
||
| 49 | [], |
||
| 50 | ['CONTENT_TYPE' => 'application/json'], |
||
| 51 | ''); |
||
| 52 | $response = $client->getResponse(); |
||
| 53 | |||
| 54 | |||
| 55 | $this->assertEquals(204, $response->getStatusCode()); //TODO verificare che il dato non sia più presente sul server |
||
| 56 | |||
| 57 | return [$id, $part_id]; |
||
| 58 | } |
||
| 59 | } |
||
| 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.