@@ -123,7 +123,7 @@ |
||
123 | 123 | $titleLineNumber = count($lines); |
124 | 124 | |
125 | 125 | // ensure an empty line preceeds comment |
126 | - if(! empty($lines[$titleLineNumber - 1])) |
|
126 | + if( ! empty($lines[$titleLineNumber - 1])) |
|
127 | 127 | { |
128 | 128 | $lines[$titleLineNumber] = ''; |
129 | 129 | $titleLineNumber++; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | $rootPath = ''; |
65 | 65 | } |
66 | 66 | |
67 | - if(! empty($rootPath)) |
|
67 | + if( ! empty($rootPath)) |
|
68 | 68 | { |
69 | 69 | $rootPath .= $directorySeparator; |
70 | 70 | } |
@@ -42,13 +42,13 @@ |
||
42 | 42 | |
43 | 43 | if($this->vcs->isTracked($targetFile)) |
44 | 44 | { |
45 | - $this->logger->info("Untrack $targetFile"); |
|
45 | + $this->logger->info("untrack $targetFile"); |
|
46 | 46 | $this->vcs->untrackFile($targetFile); |
47 | 47 | } |
48 | 48 | |
49 | 49 | if($this->vcs->isIgnored($targetFile) === false) |
50 | 50 | { |
51 | - $this->logger->info("Ignore $targetFile"); |
|
51 | + $this->logger->info("ignore $targetFile"); |
|
52 | 52 | $this->vcs->ignoreFile($targetFile); |
53 | 53 | } |
54 | 54 | } |
@@ -154,7 +154,7 @@ |
||
154 | 154 | |
155 | 155 | $this['vcs'] = $this['git']; |
156 | 156 | |
157 | - $this['vcsHandler'] = $this->protect(function (Vcs $vcs) { |
|
157 | + $this['vcsHandler'] = $this->protect(function(Vcs $vcs) { |
|
158 | 158 | $handler = new VcsHandler($vcs, $this['finder']); |
159 | 159 | |
160 | 160 | $handler->setLogger($this['logger']) |
@@ -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 |
@@ -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 |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | foreach($overrides as $variable => $value) |
166 | 166 | { |
167 | 167 | $logger->info(sprintf( |
168 | - 'Override <important>%s</important> with value <important>%s</important>', |
|
169 | - $variable, |
|
170 | - $value |
|
168 | + 'Override <important>%s</important> with value <important>%s</important>', |
|
169 | + $variable, |
|
170 | + $value |
|
171 | 171 | )); |
172 | 172 | |
173 | 173 | $reader->overrideVariable($variable, $this->filterValue($value)); |
@@ -182,9 +182,9 @@ discard block |
||
182 | 182 | foreach($data as $variable => $value) |
183 | 183 | { |
184 | 184 | $logger->info(sprintf( |
185 | - 'Set custom data <important>%s</important> with value <important>%s</important>', |
|
186 | - $variable, |
|
187 | - $value |
|
185 | + 'Set custom data <important>%s</important> with value <important>%s</important>', |
|
186 | + $variable, |
|
187 | + $value |
|
188 | 188 | )); |
189 | 189 | |
190 | 190 | $reader->setCustomData($variable, $this->filterValue($value)); |
@@ -125,7 +125,7 @@ |
||
125 | 125 | { |
126 | 126 | $strings = $input->getOption($optionName); |
127 | 127 | |
128 | - if(! is_array($strings)) |
|
128 | + if( ! is_array($strings)) |
|
129 | 129 | { |
130 | 130 | $strings = array($strings); |
131 | 131 | } |
@@ -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 |
@@ -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 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $this->variables = $variables; |
23 | 23 | |
24 | 24 | $this->externalReader = null; |
25 | - if(! empty($externalVariables)) |
|
25 | + if( ! empty($externalVariables)) |
|
26 | 26 | { |
27 | 27 | $this->externalReader = new Reader($externalVariables, array()); |
28 | 28 | } |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | private function readVariable($variable, $environment) |
42 | 42 | { |
43 | - if(! array_key_exists($variable, $this->variables)) |
|
43 | + if( ! array_key_exists($variable, $this->variables)) |
|
44 | 44 | { |
45 | 45 | throw new \RuntimeException(sprintf( |
46 | 46 | 'Unknown variable %s', |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | private function processExternal($variable, $environment) |
76 | 76 | { |
77 | - if(! $this->externalReader instanceof Reader) |
|
77 | + if( ! $this->externalReader instanceof Reader) |
|
78 | 78 | { |
79 | 79 | throw new \RuntimeException(sprintf( |
80 | 80 | 'There is no external variables. %s can not be resolve for environment %s', |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $lines = array(); |
68 | 68 | $lines[] = $separatorRow; |
69 | 69 | |
70 | - if(! empty($this->headers)) |
|
70 | + if( ! empty($this->headers)) |
|
71 | 71 | { |
72 | 72 | $lines[] = $this->renderLine($this->headers); |
73 | 73 | $lines[] = $separatorRow; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | return; |
91 | 91 | } |
92 | 92 | |
93 | - if(! empty($this->headers)) |
|
93 | + if( ! empty($this->headers)) |
|
94 | 94 | { |
95 | 95 | array_unshift($this->headers, ''); |
96 | 96 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $this->columnsSize = array_pad(array(), $this->nbColumns, -1); |
110 | 110 | |
111 | - if(! empty($this->headers)) |
|
111 | + if( ! empty($this->headers)) |
|
112 | 112 | { |
113 | 113 | $this->updateColumnsSize(array($this->headers)); |
114 | 114 | } |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | foreach($newValues as $row) |
134 | 134 | { |
135 | - if(! is_array($row)) |
|
135 | + if( ! is_array($row)) |
|
136 | 136 | { |
137 | 137 | throw new \InvalidArgumentException('Rows must be arrays'); |
138 | 138 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | |
183 | 183 | private function stripTags($value) |
184 | 184 | { |
185 | - return preg_replace ('/<[^>]*>/', '', $value); |
|
185 | + return preg_replace('/<[^>]*>/', '', $value); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | private function renderLine(array $row) |