Completed
Push — 57-formatter-per-extension ( 73b3c8 )
by Nicolas
40:17 queued 36:16
created
src/Karma/Configuration/AbstractReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/FilterInputVariable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/Parser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/Parser/GroupParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)',
Please login to merge, or discard this patch.
src/Karma/Formatters/Rules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/VcsHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             $rootPath = '';
65 65
         }
66 66
 
67
-        if(! empty($rootPath))
67
+        if( ! empty($rootPath))
68 68
         {
69 69
             $rootPath .= $directorySeparator;
70 70
         }
Please login to merge, or discard this patch.
src/Karma/Command/Hydrate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/Reader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
src/Karma/ProfileReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
 
30 30
     private function parseFormatters($content)
31 31
     {
32
-        if(! is_array($content))
32
+        if( ! is_array($content))
33 33
         {
34 34
             throw new \InvalidArgumentException('Syntax error in profile [formatters]');
35 35
         }
36 36
 
37 37
         foreach($content as $name => $rules)
38 38
         {
39
-            if(! is_array($rules))
39
+            if( ! is_array($rules))
40 40
             {
41 41
                 throw new \InvalidArgumentException('Syntax error in profile [formatters]');
42 42
             }
Please login to merge, or discard this patch.