@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | public function setDefaultEnvironment($environment) |
| 42 | 42 | { |
| 43 | - if(! empty($environment) && is_string($environment)) |
|
| 43 | + if( ! empty($environment) && is_string($environment)) |
|
| 44 | 44 | { |
| 45 | 45 | $this->defaultEnvironment = $environment; |
| 46 | 46 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | private function handleCustomData($value) |
| 90 | 90 | { |
| 91 | - if(! is_string($value)) |
|
| 91 | + if( ! is_string($value)) |
|
| 92 | 92 | { |
| 93 | 93 | return $value; |
| 94 | 94 | } |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | if(is_array($value)) |
| 10 | 10 | { |
| 11 | - return array_map(function ($item) { |
|
| 11 | + return array_map(function($item) { |
|
| 12 | 12 | return $this->filterOneValue($item); |
| 13 | 13 | }, $value); |
| 14 | 14 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | private function filterOneValue($value) |
| 20 | 20 | { |
| 21 | - if(! is_string($value)) |
|
| 21 | + if( ! is_string($value)) |
|
| 22 | 22 | { |
| 23 | 23 | return $value; |
| 24 | 24 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | public function enableIncludeSupport() |
| 51 | 51 | { |
| 52 | - if(! isset($this->parsers[self::INCLUDES])) |
|
| 52 | + if( ! isset($this->parsers[self::INCLUDES])) |
|
| 53 | 53 | { |
| 54 | 54 | $this->parsers[self::INCLUDES] = new IncludeParser(); |
| 55 | 55 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | public function enableExternalSupport() |
| 61 | 61 | { |
| 62 | - if(! isset($this->parsers[self::EXTERNALS])) |
|
| 62 | + if( ! isset($this->parsers[self::EXTERNALS])) |
|
| 63 | 63 | { |
| 64 | 64 | $this->parsers[self::EXTERNALS] = new ExternalParser(new Parser($this->fs)); |
| 65 | 65 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | public function enableGroupSupport() |
| 71 | 71 | { |
| 72 | - if(! isset($this->parsers[self::GROUPS])) |
|
| 72 | + if( ! isset($this->parsers[self::GROUPS])) |
|
| 73 | 73 | { |
| 74 | 74 | $this->parsers[self::GROUPS] = new GroupParser(); |
| 75 | 75 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | { |
| 102 | 102 | $files = array($masterFilePath); |
| 103 | 103 | |
| 104 | - while(! empty($files)) |
|
| 104 | + while( ! empty($files)) |
|
| 105 | 105 | { |
| 106 | 106 | foreach($files as $file) |
| 107 | 107 | { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | private function extractLines($filePath) |
| 153 | 153 | { |
| 154 | - if(! $this->fs->has($filePath)) |
|
| 154 | + if( ! $this->fs->has($filePath)) |
|
| 155 | 155 | { |
| 156 | 156 | throw new \RuntimeException("$filePath does not exist"); |
| 157 | 157 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | private function switchSectionParser($sectionName) |
| 203 | 203 | { |
| 204 | - if(! isset($this->parsers[$sectionName])) |
|
| 204 | + if( ! isset($this->parsers[$sectionName])) |
|
| 205 | 205 | { |
| 206 | 206 | throw new \RuntimeException('Unknown section name ' . $sectionName); |
| 207 | 207 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | private function hasDuplicatedValues(array $values) |
| 106 | 106 | { |
| 107 | - $duplicatedValues = array_filter(array_count_values($values), function ($counter) { |
|
| 107 | + $duplicatedValues = array_filter(array_count_values($values), function($counter) { |
|
| 108 | 108 | return $counter !== 1; |
| 109 | 109 | }); |
| 110 | 110 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | $errors = array_intersect($allEnvironments, array_keys($this->groups)); |
| 152 | 152 | |
| 153 | - if(! empty($errors)) |
|
| 153 | + if( ! empty($errors)) |
|
| 154 | 154 | { |
| 155 | 155 | throw new \RuntimeException(sprintf( |
| 156 | 156 | 'Error : a group can not be part of another group (%s)', |
@@ -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 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | { |
| 50 | 50 | if($value === '<string>') |
| 51 | 51 | { |
| 52 | - $result = function ($value) use ($result) { |
|
| 52 | + $result = function($value) use ($result) { |
|
| 53 | 53 | return str_replace('<string>', $value, $result); |
| 54 | 54 | }; |
| 55 | 55 | } |
@@ -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++; |
@@ -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 | } |