@@ -14,6 +14,9 @@ |
||
| 14 | 14 | $isRegex, |
| 15 | 15 | $filter; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $filter |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct($filter, \Iterator $iterator) |
| 18 | 21 | { |
| 19 | 22 | parent::__construct($iterator); |
@@ -65,6 +65,9 @@ discard block |
||
| 65 | 65 | return $this; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | + /** |
|
| 69 | + * @param string $masterFilePath |
|
| 70 | + */ |
|
| 68 | 71 | public function parse($masterFilePath) |
| 69 | 72 | { |
| 70 | 73 | try |
@@ -182,6 +185,9 @@ discard block |
||
| 182 | 185 | return $groupName; |
| 183 | 186 | } |
| 184 | 187 | |
| 188 | + /** |
|
| 189 | + * @param string $groupName |
|
| 190 | + */ |
|
| 185 | 191 | private function switchGroupParser($groupName) |
| 186 | 192 | { |
| 187 | 193 | if(! isset($this->parsers[$groupName])) |
@@ -101,6 +101,11 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | + /** |
|
| 105 | + * @param string|boolean $content |
|
| 106 | + * |
|
| 107 | + * @return string |
|
| 108 | + */ |
|
| 104 | 109 | private function injectValues($sourceFile, $content, $environment) |
| 105 | 110 | { |
| 106 | 111 | $formatter = $this->formatterProvider->getFormatter(); |
@@ -118,6 +123,9 @@ discard block |
||
| 118 | 123 | return $targetContent; |
| 119 | 124 | } |
| 120 | 125 | |
| 126 | + /** |
|
| 127 | + * @param string $targetFile |
|
| 128 | + */ |
|
| 121 | 129 | private function backupFile($targetFile) |
| 122 | 130 | { |
| 123 | 131 | if($this->enableBackup === true) |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | |
| 89 | 89 | private function injectValues($sourceFile, $content, $environment) |
| 90 | 90 | { |
| 91 | - $targetContent = preg_replace_callback('~<%(?P<variableName>[A-Za-z0-9_\.]+)%>~', function(array $matches) use($environment){ |
|
| 91 | + $targetContent = preg_replace_callback('~<%(?P<variableName>[A-Za-z0-9_\.]+)%>~', function(array $matches) use($environment) { |
|
| 92 | 92 | return $this->reader->read($matches['variableName'], $environment); |
| 93 | 93 | }, $content, -1, $count); |
| 94 | 94 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $table->enableFormattingTags() |
| 46 | 46 | ->setHeaders(array($environment1, $environment2)) |
| 47 | 47 | ->displayKeys() |
| 48 | - ->setValueRenderingFunction(function($value){ |
|
| 48 | + ->setValueRenderingFunction(function($value) { |
|
| 49 | 49 | return $this->formatValue($value); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | private function processInputs(InputInterface $input) |
| 47 | - { |
|
| 47 | + { |
|
| 48 | 48 | $sourcePath = $input->getArgument('sourcePath'); |
| 49 | 49 | if($sourcePath === null) |
| 50 | 50 | { |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function getAllVariables() |
| 35 | 35 | { |
| 36 | - $variables = array_map(function($item){ |
|
| 36 | + $variables = array_map(function($item) { |
|
| 37 | 37 | return explode(':', $item)[0]; |
| 38 | 38 | }, array_keys($this->values)); |
| 39 | 39 | |