@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | continue; |
| 75 | 75 | } |
| 76 | 76 | $result = (new Analyser())->countFiles($group->getFiles(), false); |
| 77 | - foreach ($result as $key =>$value){ |
|
| 77 | + foreach ($result as $key =>$value) { |
|
| 78 | 78 | $statistic[$group->getName()][] = ['Metric'=>$key, 'Value'=>$value]; |
| 79 | 79 | } |
| 80 | 80 | unset($result); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | { |
| 92 | 92 | $statistic = []; |
| 93 | 93 | $result = (new Analyser())->countFiles($files, false); |
| 94 | - foreach ($result as $key =>$value){ |
|
| 94 | + foreach ($result as $key =>$value) { |
|
| 95 | 95 | $statistic[] = ['Metric'=>$key, 'Value'=>$value]; |
| 96 | 96 | } |
| 97 | 97 | return $statistic; |
@@ -52,13 +52,13 @@ discard block |
||
| 52 | 52 | $this->headline('YII-2 Code Statistic', 'lightYellow'); |
| 53 | 53 | $this->climate->table($summary); |
| 54 | 54 | |
| 55 | - if($showErrors !== true){ |
|
| 55 | + if ($showErrors !== true) { |
|
| 56 | 56 | return ExitCode::OK; |
| 57 | 57 | } |
| 58 | 58 | $this->headline('Failed for resolve', 'lightYellow'); |
| 59 | - if(!count($service->errorList())){ |
|
| 59 | + if (!count($service->errorList())) { |
|
| 60 | 60 | $this->climate->info('Errors not found'); |
| 61 | - }else{ |
|
| 61 | + } else { |
|
| 62 | 62 | $this->climate->table($service->errorList()); |
| 63 | 63 | } |
| 64 | 64 | return ExitCode::OK; |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | $statistic = $service->makeAdvancedStatistic($this->module->prepareFiles()); |
| 76 | 76 | $this->headline('YII-2 Code Statistic', 'green'); |
| 77 | 77 | |
| 78 | - if($groupName !==null){ |
|
| 79 | - if(!isset($statistic[$groupName])){ |
|
| 80 | - $this->stderr('Undefined group '.$groupName); |
|
| 78 | + if ($groupName !== null) { |
|
| 79 | + if (!isset($statistic[$groupName])) { |
|
| 80 | + $this->stderr('Undefined group ' . $groupName); |
|
| 81 | 81 | return ExitCode::DATAERR; |
| 82 | 82 | } |
| 83 | 83 | $this->headline($groupName, 'lightYellow'); |
@@ -85,10 +85,10 @@ discard block |
||
| 85 | 85 | return ExitCode::OK; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - foreach ($statistic as $group =>$data){ |
|
| 88 | + foreach ($statistic as $group =>$data) { |
|
| 89 | 89 | $this->headline($group, 'lightYellow'); |
| 90 | 90 | $this->climate->table($data); |
| 91 | - if(!$this->confirm('Show next group?')){ |
|
| 91 | + if (!$this->confirm('Show next group?')) { |
|
| 92 | 92 | break; |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $value = $this->wrap($value, 'light_cyan'); |
| 133 | 133 | } |
| 134 | 134 | $key = $this->wrap($key, 'green'); |
| 135 | - $colorized[$i][$key] = (string)$value; |
|
| 135 | + $colorized[$i][$key] = (string) $value; |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | return $colorized; |