Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | public function testGetBadgeSpecialita(){ |
||
13 | $schema = __DIR__.'/../../../../api/schemas/badgeList.json'; |
||
14 | $client = $this->createClient(); |
||
15 | $client = $this->logIn($client); |
||
16 | |||
17 | $kind_of_badge = ['specialita','brevetti','eventi']; |
||
18 | |||
19 | foreach($kind_of_badge as $option){ |
||
20 | |||
21 | $crawler = $client->request('GET', '/api/v1/badge/?filterBy='.$option); |
||
|
|||
22 | $response = $client->getResponse(); |
||
23 | |||
24 | //print_r($response); |
||
25 | $data = $client->getResponse()->getContent(); |
||
26 | |||
27 | $validator = $this->askValidation($data, $schema); |
||
28 | |||
29 | $assert = $this->evalValidation($validator); |
||
30 | $this->assertTrue($assert); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 |
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.