@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | private function checkFilenameIsValid($filename) |
28 | 28 | { |
29 | - if(! preg_match('~.*\.conf$~', $filename)) |
|
29 | + if( ! preg_match('~.*\.conf$~', $filename)) |
|
30 | 30 | { |
31 | 31 | $this->triggerError("$filename is not a valid file name", 'Invalid dependency'); |
32 | 32 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | { |
43 | 43 | if($verbosity <= $this->output->getVerbosity()) |
44 | 44 | { |
45 | - if(! is_array($messages)) |
|
45 | + if( ! is_array($messages)) |
|
46 | 46 | { |
47 | 47 | $messages = array($messages); |
48 | 48 | } |
@@ -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++; |
@@ -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 |
@@ -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 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function enableIncludeSupport() |
49 | 49 | { |
50 | - if(! isset($this->parsers[self::INCLUDES])) |
|
50 | + if( ! isset($this->parsers[self::INCLUDES])) |
|
51 | 51 | { |
52 | 52 | $this->parsers[self::INCLUDES] = new IncludeParser(); |
53 | 53 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | public function enableExternalSupport() |
59 | 59 | { |
60 | - if(! isset($this->parsers[self::EXTERNALS])) |
|
60 | + if( ! isset($this->parsers[self::EXTERNALS])) |
|
61 | 61 | { |
62 | 62 | $this->parsers[self::EXTERNALS] = new ExternalParser(new Parser($this->fs)); |
63 | 63 | } |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | { |
88 | 88 | $files = array($masterFilePath); |
89 | 89 | |
90 | - while(! empty($files)) |
|
90 | + while( ! empty($files)) |
|
91 | 91 | { |
92 | 92 | foreach($files as $file) |
93 | 93 | { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | private function extractLines($filePath) |
135 | 135 | { |
136 | - if(! $this->fs->has($filePath)) |
|
136 | + if( ! $this->fs->has($filePath)) |
|
137 | 137 | { |
138 | 138 | throw new \RuntimeException("$filePath does not exist"); |
139 | 139 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | private function switchGroupParser($groupName) |
186 | 186 | { |
187 | - if(! isset($this->parsers[$groupName])) |
|
187 | + if( ! isset($this->parsers[$groupName])) |
|
188 | 188 | { |
189 | 189 | throw new \RuntimeException('Unknown group name ' . $groupName); |
190 | 190 | } |
@@ -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) |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->variables = $variables; |
24 | 24 | |
25 | 25 | $this->externalReader = null; |
26 | - if(! empty($externalVariables)) |
|
26 | + if( ! empty($externalVariables)) |
|
27 | 27 | { |
28 | 28 | $this->externalReader = new Reader($externalVariables, array()); |
29 | 29 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | public function setDefaultEnvironment($environment) |
33 | 33 | { |
34 | - if(! empty($environment) && is_string($environment)) |
|
34 | + if( ! empty($environment) && is_string($environment)) |
|
35 | 35 | { |
36 | 36 | $this->defaultEnvironment = $environment; |
37 | 37 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | private function readVariable($variable, $environment) |
53 | 53 | { |
54 | - if(! array_key_exists($variable, $this->variables)) |
|
54 | + if( ! array_key_exists($variable, $this->variables)) |
|
55 | 55 | { |
56 | 56 | throw new \RuntimeException(sprintf( |
57 | 57 | 'Unknown variable %s', |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | private function processExternal($variable, $environment) |
87 | 87 | { |
88 | - if(! $this->externalReader instanceof Reader) |
|
88 | + if( ! $this->externalReader instanceof Reader) |
|
89 | 89 | { |
90 | 90 | throw new \RuntimeException(sprintf( |
91 | 91 | 'There is no external variables. %s can not be resolve for environment %s', |