Test Failed
Pull Request — master (#925)
by butschster
16:57 queued 09:14
created
src/Scaffolder/src/Config/ScaffolderConfig.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $class = $this->classify($name);
59 59
         $postfix = $this->elementPostfix($element);
60 60
 
61
-        return \str_ends_with($class, $postfix) ? $class : $class . $postfix;
61
+        return \str_ends_with($class, $postfix) ? $class : $class.$postfix;
62 62
     }
63 63
 
64 64
     /**
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
         $localNamespace = \trim($this->getOption($element, 'namespace', ''), '\\');
70 70
         ['namespace' => $namespace] = $this->parseName($name);
71 71
 
72
-        if (!empty($namespace)) {
73
-            $localNamespace .= '\\' . $this->classify($namespace);
72
+        if (!empty($namespace)){
73
+            $localNamespace .= '\\'.$this->classify($namespace);
74 74
         }
75 75
 
76
-        if (empty($this->baseNamespace($element))) {
76
+        if (empty($this->baseNamespace($element))){
77 77
             return $localNamespace;
78 78
         }
79 79
 
80
-        return \trim($this->baseNamespace($element) . '\\' . $localNamespace, '\\');
80
+        return \trim($this->baseNamespace($element).'\\'.$localNamespace, '\\');
81 81
     }
82 82
 
83 83
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         return $this->joinPathChunks([
95 95
             $this->declarationDirectory($element),
96 96
             \str_replace('\\', '/', $elementNamespace),
97
-            $this->className($element, $name) . '.php',
97
+            $this->className($element, $name).'.php',
98 98
         ], '/');
99 99
     }
100 100
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     {
108 108
         $class = $this->getOption($element, 'class');
109 109
 
110
-        if (empty($class)) {
110
+        if (empty($class)){
111 111
             throw new ScaffolderException(
112 112
                 \sprintf("Unable to scaffold '%s', no declaration class found", $element)
113 113
             );
@@ -142,11 +142,11 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $declaration = $this->getDeclaration($element);
144 144
 
145
-        if ($declaration === []) {
145
+        if ($declaration === []){
146 146
             throw new ScaffolderException(\sprintf("Undefined declaration '%s'.", $element));
147 147
         }
148 148
 
149
-        if (\array_key_exists($section, $declaration)) {
149
+        if (\array_key_exists($section, $declaration)){
150 150
             return $declaration[$section];
151 151
         }
152 152
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     {
165 165
         $name = \str_replace('/', '\\', $name);
166 166
 
167
-        if (str_contains($name, '\\')) {
167
+        if (str_contains($name, '\\')){
168 168
             $names = \explode('\\', $name);
169 169
             $class = \array_pop($names);
170 170
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
     {
183 183
         $declaration = $this->getDeclaration($element);
184 184
 
185
-        if (\array_key_exists('baseNamespace', $declaration)) {
186
-            return \trim((string) $this->getOption($element, 'baseNamespace', ''), '\\');
185
+        if (\array_key_exists('baseNamespace', $declaration)){
186
+            return \trim((string)$this->getOption($element, 'baseNamespace', ''), '\\');
187 187
         }
188 188
 
189 189
         return \trim($this->config['namespace'], '\\');
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $firstChunkIterated = false;
195 195
         $joinedPath = '';
196
-        foreach ($chunks as $chunk) {
197
-            if (!$firstChunkIterated) {
196
+        foreach ($chunks as $chunk){
197
+            if (!$firstChunkIterated){
198 198
                 $firstChunkIterated = true;
199 199
                 $joinedPath = $chunk;
200
-            } else {
201
-                $joinedPath = \rtrim($joinedPath, $joint) . $joint . \ltrim($chunk, $joint);
200
+            }else{
201
+                $joinedPath = \rtrim($joinedPath, $joint).$joint.\ltrim($chunk, $joint);
202 202
             }
203 203
         }
204 204
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
     private function classify(string $name): string
209 209
     {
210
-        return ( new InflectorFactory() )
210
+        return (new InflectorFactory())
211 211
             ->build()
212 212
             ->classify($name);
213 213
     }
Please login to merge, or discard this patch.