@@ -99,6 +99,9 @@ |
||
99 | 99 | || $input->hasParameterOption('-r'); |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param string $filename |
|
104 | + */ |
|
102 | 105 | private function regenerate(InputInterface $input, $filename) { |
103 | 106 | $filename = str_replace(DIRECTORY_SEPARATOR, '/', $filename); |
104 | 107 | $patterns = $input->getArgument('files'); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | /** @var \SplFileInfo $file */ |
60 | 60 | foreach ($iterator as $file) { |
61 | 61 | $pathname = substr($file->getPathname(), strlen($this->_input) + 1); |
62 | - if(!$this->regenerate($input, $pathname)) { |
|
62 | + if (!$this->regenerate($input, $pathname)) { |
|
63 | 63 | continue; |
64 | 64 | } |
65 | 65 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if ($this->review($input, $output, $tokens, $reviewer)) { |
72 | 72 | $result = StringHelper::normalize($this->_formatter->format($tokens)); |
73 | 73 | |
74 | - if(!file_exists($this->_output.'/'.dirname($pathname))) { |
|
74 | + if (!file_exists($this->_output.'/'.dirname($pathname))) { |
|
75 | 75 | mkdir($this->_output.'/'.dirname($pathname), true); |
76 | 76 | } |
77 | 77 | |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | $filename = str_replace(DIRECTORY_SEPARATOR, '/', $filename); |
104 | 104 | $patterns = $input->getArgument('files'); |
105 | 105 | |
106 | - foreach($patterns as $pattern) { |
|
107 | - if($input->getOption('new') && file_exists("{$this->_output}/$filename.tkn")) { |
|
106 | + foreach ($patterns as $pattern) { |
|
107 | + if ($input->getOption('new') && file_exists("{$this->_output}/$filename.tkn")) { |
|
108 | 108 | continue; |
109 | 109 | } |
110 | 110 | |
111 | - if(fnmatch($pattern, $filename)) { |
|
111 | + if (fnmatch($pattern, $filename)) { |
|
112 | 112 | return true; |
113 | 113 | } |
114 | 114 | } |