| Conditions | 6 | 
| Paths | 7 | 
| Total Lines | 35 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 20 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 22 | 66 | private function title()  | 
            |
| 23 |     { | 
            ||
| 24 | 66 | $title = '';  | 
            |
| 
                                                                                                    
                        
                         | 
                |||
| 25 | |||
| 26 | 66 |         if ($this->command === 'vendor:publish') { | 
            |
| 27 | 60 | $title = '<comment>Publishing resource:</comment> ';  | 
            |
| 28 | |||
| 29 | 60 |             if (isset($this->arguments['--provider'])) { | 
            |
| 30 | 60 |                 $title .= "Provider [<fg=cyan>{$this->arguments['--provider']}</>]"; | 
            |
| 31 | }  | 
            ||
| 32 | |||
| 33 |             $tagStringCallback = function (string $tag) { | 
            ||
| 34 | 30 | return " Tag[<fg=cyan>$tag</>]";  | 
            |
| 35 | 60 | };  | 
            |
| 36 | |||
| 37 | 60 |             if (isset($this->arguments['--tag'])) { | 
            |
| 38 | 30 |                 if (is_string($this->arguments['--tag'])) { | 
            |
| 39 | 24 | $title .= $tagStringCallback($this->arguments['--tag']);  | 
            |
| 40 |                 } else { | 
            ||
| 41 | 60 |                     foreach ($this->arguments['--tag'] as $tag) { | 
            |
| 42 | 6 | $title .= $tagStringCallback($tag);  | 
            |
| 43 | }  | 
            ||
| 44 | }  | 
            ||
| 45 | }  | 
            ||
| 46 |         } else { | 
            ||
| 47 | 6 |             $title = "<comment>Running artisan command:</comment> $this->command (". | 
            |
| 48 | 6 | $this->artisanCommand  | 
            |
| 49 | 6 | ->getApplication()  | 
            |
| 50 | 6 | ->find($this->command)  | 
            |
| 51 | 6 | ->getDescription().  | 
            |
| 52 | 6 | ')';  | 
            |
| 53 | }  | 
            ||
| 54 | |||
| 55 | 66 | return $title;  | 
            |
| 56 | }  | 
            ||
| 57 | |||
| 71 | 
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.