@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** @var \SplFileInfo $file */ |
| 52 | 52 | foreach ($iterator as $file) { |
| 53 | 53 | $pathname = substr($file->getPathname(), strlen($this->_input) + 1); |
| 54 | - if(!$this->regenerate($input, $pathname)) { |
|
| 54 | + if (!$this->regenerate($input, $pathname)) { |
|
| 55 | 55 | continue; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | $language = Language::byFilename($pathname); |
| 61 | 61 | $result = $this->_keylighter->highlight(file_get_contents($file->getPathname()), $language, $this->_formatter); |
| 62 | 62 | |
| 63 | - if(!file_exists($this->_output.'/'.dirname($pathname))) { |
|
| 63 | + if (!file_exists($this->_output.'/'.dirname($pathname))) { |
|
| 64 | 64 | mkdir($this->_output.'/'.dirname($pathname), true); |
| 65 | 65 | } |
| 66 | 66 | |
@@ -72,12 +72,12 @@ discard block |
||
| 72 | 72 | $filename = str_replace(DIRECTORY_SEPARATOR, '/', $filename); |
| 73 | 73 | $patterns = $input->getArgument('files'); |
| 74 | 74 | |
| 75 | - foreach($patterns as $pattern) { |
|
| 76 | - if($input->getOption('new') && file_exists("{$this->_output}/$filename.tkn")) { |
|
| 75 | + foreach ($patterns as $pattern) { |
|
| 76 | + if ($input->getOption('new') && file_exists("{$this->_output}/$filename.tkn")) { |
|
| 77 | 77 | continue; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | - if(fnmatch($pattern, $filename)) { |
|
| 80 | + if (fnmatch($pattern, $filename)) { |
|
| 81 | 81 | return true; |
| 82 | 82 | } |
| 83 | 83 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $this->separator($file, $table); |
| 50 | 50 | |
| 51 | 51 | foreach ($data['times'] as $set => $times) { |
| 52 | - $result = array_map(function ($time) use ($data, $input) { |
|
| 52 | + $result = array_map(function($time) use ($data, $input) { |
|
| 53 | 53 | return $input->getOption('relative') ? $data['size'] / $time : $time * 1000; |
| 54 | 54 | }, $times); |
| 55 | 55 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if(!$input->hasOption('summary')) { |
|
| 62 | + if (!$input->hasOption('summary')) { |
|
| 63 | 63 | $table->render(); |
| 64 | 64 | } |
| 65 | 65 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | }, ARRAY_FILTER_USE_KEY); |
| 69 | 69 | |
| 70 | 70 | $max = max(array_map('strlen', array_keys($summary))); |
| 71 | - foreach($summary as $name => $set) { |
|
| 71 | + foreach ($summary as $name => $set) { |
|
| 72 | 72 | $output->writeln(sprintf( |
| 73 | 73 | "<comment>%s</comment> %s %s", |
| 74 | 74 | str_pad($name, $max, ' ', STR_PAD_LEFT), |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | { |
| 118 | 118 | $mean = array_sum($result) / count($result); |
| 119 | 119 | |
| 120 | - return sqrt(array_sum(array_map(function ($result) use ($mean) { |
|
| 120 | + return sqrt(array_sum(array_map(function($result) use ($mean) { |
|
| 121 | 121 | return pow($result - $mean, 2); |
| 122 | 122 | }, $result)) / count($result)); |
| 123 | 123 | } |