Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
17 | public function testCreateApplicationWithToken_() |
||
18 | { |
||
19 | $user = $this->registerAndLoginTestingDeveloper(); |
||
|
|||
20 | |||
21 | $data = [ |
||
22 | 'name' => 'My first App' |
||
23 | ]; |
||
24 | |||
25 | // send the HTTP request |
||
26 | $response = $this->apiCall($this->endpoint, 'post', $data); |
||
27 | |||
28 | // assert response status is correct |
||
29 | $this->assertEquals($response->getStatusCode(), '200'); |
||
30 | |||
31 | // assert response contain the data |
||
32 | $this->assertResponseContainKeys(['token'], $response); |
||
33 | } |
||
34 | |||
36 |
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.