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