| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 21 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 5 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 40 | public function testSettingsAction()  | 
            ||
| 41 |     { | 
            ||
| 42 | $this->getManager();  | 
            ||
| 43 | /** @var Client $client */  | 
            ||
| 44 | $client = $this->client;  | 
            ||
| 45 | |||
| 46 | // Visit settings page.  | 
            ||
| 47 |         $crawler = $client->request('GET', '/settings/settings'); | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 48 | |||
| 49 | // Assert categories are rendered.  | 
            ||
| 50 | /** @var array $categories */  | 
            ||
| 51 |         $categories = $client->getContainer()->getParameter('ongr_settings.settings.categories'); | 
            ||
| 52 | $content = $client->getResponse()->getContent();  | 
            ||
| 53 | unset($categories['ongr_settings_profiles']);  | 
            ||
| 54 | |||
| 55 | // Print $content.  | 
            ||
| 56 |         foreach ($categories as $category) { | 
            ||
| 57 | $this->assertContains($category['name'], $content);  | 
            ||
| 58 | }  | 
            ||
| 59 | |||
| 60 | }  | 
            ||
| 61 | }  | 
            ||
| 62 | 
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.