Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testGetWorkspaceList(){ |
||
13 | $schema = __DIR__.'/../../../../api/schemas/workspaceList.json'; |
||
|
|||
14 | |||
15 | //$client = $this->createClient(); |
||
16 | //$client = $this->logIn($client); |
||
17 | |||
18 | //$crawler = $client->request('GET', '/api/v1/workspace/'); |
||
19 | /*$response = $client->getResponse(); |
||
20 | print_r("funziona:"); |
||
21 | print_r($response); |
||
22 | $data = $client->getResponse()->getContent(); |
||
23 | print_r($data); |
||
24 | $validator = $this->askValidation($data,$schema); |
||
25 | |||
26 | if ($validator->isValid()) { |
||
27 | echo "The supplied JSON validates against the schema.\n"; |
||
28 | $this->assertTrue(true); |
||
29 | } else { |
||
30 | echo "JSON does not validate. Violations:\n"; |
||
31 | foreach ($validator->getErrors() as $error) { |
||
32 | echo "[{$error['property']}] {$error['message']}\n"; |
||
33 | } |
||
34 | $this->assertTrue(false); |
||
35 | }*/ |
||
36 | $this->assertTrue(true); |
||
37 | } |
||
38 | } |
||
39 |
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.