@@ -64,13 +64,13 @@ discard block |
||
| 64 | 64 | $this->headline('YII-2 Code Statistic', 'lightYellow'); |
| 65 | 65 | $this->climate->table($summary); |
| 66 | 66 | |
| 67 | - if($showErrors !== true){ |
|
| 67 | + if ($showErrors !== true) { |
|
| 68 | 68 | return ExitCode::OK; |
| 69 | 69 | } |
| 70 | 70 | $this->headline('Failed for resolve', 'lightYellow'); |
| 71 | - if(!count($service->errorList())){ |
|
| 71 | + if (!count($service->errorList())) { |
|
| 72 | 72 | $this->climate->info('Errors not found'); |
| 73 | - }else{ |
|
| 73 | + } else { |
|
| 74 | 74 | Output::arrayList($service->errorList()); |
| 75 | 75 | } |
| 76 | 76 | return ExitCode::OK; |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | { |
| 128 | 128 | $service = $this->module->statService; |
| 129 | 129 | $dir = \Yii::getAlias($dir); |
| 130 | - if(!is_dir($dir)){ |
|
| 131 | - $this->stderr('Directory not found by path '.$dir); |
|
| 130 | + if (!is_dir($dir)) { |
|
| 131 | + $this->stderr('Directory not found by path ' . $dir); |
|
| 132 | 132 | return ExitCode::UNSPECIFIED_ERROR; |
| 133 | 133 | } |
| 134 | 134 | $statistic = $service->makeCommonStatistic(FileHelper::findFiles($dir, [ |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | { |
| 151 | 151 | $service = $this->module->statService; |
| 152 | 152 | $filePath = \Yii::getAlias($filePath); |
| 153 | - if(!file_exists($filePath)){ |
|
| 154 | - $this->stderr('File not found by path '.$filePath); |
|
| 153 | + if (!file_exists($filePath)) { |
|
| 154 | + $this->stderr('File not found by path ' . $filePath); |
|
| 155 | 155 | return ExitCode::UNSPECIFIED_ERROR; |
| 156 | 156 | } |
| 157 | 157 | $statistic = $service->makeCommonStatistic([$filePath], $this->module->metrics); |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | $value = $this->wrap($value, 'light_cyan'); |
| 199 | 199 | } |
| 200 | 200 | $key = $this->wrap($key, 'green'); |
| 201 | - $colorized[$i][$key] = (string)$value; |
|
| 201 | + $colorized[$i][$key] = (string) $value; |
|
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | return $colorized; |