@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Configuration\Collections; |
6 | 6 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | public function get(string $sectionName): SectionParser |
86 | 86 | { |
87 | - if(! $this->has($sectionName)) |
|
87 | + if( ! $this->has($sectionName)) |
|
88 | 88 | { |
89 | 89 | throw new \RuntimeException('Unknown section name ' . $sectionName); |
90 | 90 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Configuration; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Configuration; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Console; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Display; |
6 | 6 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $lines = array(); |
73 | 73 | $lines[] = $separatorRow; |
74 | 74 | |
75 | - if(! empty($this->headers)) |
|
75 | + if( ! empty($this->headers)) |
|
76 | 76 | { |
77 | 77 | $lines[] = $this->renderLine($this->headers); |
78 | 78 | $lines[] = $separatorRow; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | return; |
96 | 96 | } |
97 | 97 | |
98 | - if(! empty($this->headers)) |
|
98 | + if( ! empty($this->headers)) |
|
99 | 99 | { |
100 | 100 | array_unshift($this->headers, ''); |
101 | 101 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $this->columnsSize = array_pad(array(), $this->nbColumns, -1); |
115 | 115 | |
116 | - if(! empty($this->headers)) |
|
116 | + if( ! empty($this->headers)) |
|
117 | 117 | { |
118 | 118 | $this->updateColumnsSize(array($this->headers)); |
119 | 119 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | { |
141 | 141 | foreach($newValues as $row) |
142 | 142 | { |
143 | - if(! is_array($row)) |
|
143 | + if( ! is_array($row)) |
|
144 | 144 | { |
145 | 145 | throw new \InvalidArgumentException('Rows must be arrays'); |
146 | 146 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | private function stripTags(string $value): string |
192 | 192 | { |
193 | - return preg_replace ('/<[^>]*>/', '', $value); |
|
193 | + return preg_replace('/<[^>]*>/', '', $value); |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | private function renderLine(array $row): string |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Formatters; |
6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | { |
52 | 52 | if($value === '<string>') |
53 | 53 | { |
54 | - $result = static function ($value) use ($result) { |
|
54 | + $result = static function($value) use ($result) { |
|
55 | 55 | return str_replace('<string>', $value, $result); |
56 | 56 | }; |
57 | 57 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Filesystem\Adapters; |
6 | 6 | |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $this->cache = $cache; |
25 | 25 | $this->ttl = $ttl; |
26 | 26 | |
27 | - if(!$serializeCache) |
|
27 | + if( ! $serializeCache) |
|
28 | 28 | { |
29 | 29 | $serializeCache = new InMemory(); |
30 | 30 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | public function read($key) |
52 | 52 | { |
53 | - if ($this->needsReload($key)) |
|
53 | + if($this->needsReload($key)) |
|
54 | 54 | { |
55 | 55 | $contents = $this->source->read($key); |
56 | 56 | $this->cache->write($key, $contents); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | |
90 | 90 | public function exists($key) |
91 | 91 | { |
92 | - if ($this->needsReload($key)) |
|
92 | + if($this->needsReload($key)) |
|
93 | 93 | { |
94 | 94 | return $this->source->exists($key); |
95 | 95 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | $cacheFile = 'keys.cache'; |
108 | 108 | |
109 | - if ($this->needsRebuild($cacheFile)) |
|
109 | + if($this->needsRebuild($cacheFile)) |
|
110 | 110 | { |
111 | 111 | $keys = $this->source->keys(); |
112 | 112 | sort($keys); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $needsReload = $dateCache < $dateSource; |
174 | 174 | } |
175 | 175 | } |
176 | - catch (\RuntimeException $e) |
|
176 | + catch(\RuntimeException $e) |
|
177 | 177 | { |
178 | 178 | } |
179 | 179 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Console; |
6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $unusedVariables = $processor->unusedVariables(); |
41 | 41 | |
42 | - if(! empty($unusedVariables)) |
|
42 | + if( ! empty($unusedVariables)) |
|
43 | 43 | { |
44 | 44 | $logger = $this->app['logger']; |
45 | 45 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $unvaluedVariables = $processor->unvaluedVariables(); |
58 | 58 | |
59 | - if(! empty($unvaluedVariables)) |
|
59 | + if( ! empty($unvaluedVariables)) |
|
60 | 60 | { |
61 | 61 | $logger = $this->app['logger']; |
62 | 62 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma; |
6 | 6 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $paths = $c['sources.path']; |
115 | 115 | |
116 | - if(! is_array($paths)) |
|
116 | + if( ! is_array($paths)) |
|
117 | 117 | { |
118 | 118 | $paths = [$paths]; |
119 | 119 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $this['target.fileSystem.adapter'] = $this->factory(function(Container $c) { |
141 | 141 | |
142 | - if(! empty($c['target.path'])) |
|
142 | + if( ! empty($c['target.path'])) |
|
143 | 143 | { |
144 | 144 | $c['hydrator.allowNonDistFilesOverwrite'] = true; |
145 | 145 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | return new NullLogger(); |
213 | 213 | }); |
214 | 214 | |
215 | - $this['formatter.provider'] = static function (Container $c) { |
|
215 | + $this['formatter.provider'] = static function(Container $c) { |
|
216 | 216 | return new ProfileProvider($c['profile']); |
217 | 217 | }; |
218 | 218 | |
@@ -226,19 +226,19 @@ discard block |
||
226 | 226 | return $hydrator; |
227 | 227 | }); |
228 | 228 | |
229 | - $this['generator.nameTranslator'] = static function (Container $c) { |
|
229 | + $this['generator.nameTranslator'] = static function(Container $c) { |
|
230 | 230 | $translator = new FilePrefixTranslator(); |
231 | 231 | $translator->changeMasterFile($c['configuration.masterFile']); |
232 | 232 | |
233 | 233 | return $translator; |
234 | 234 | }; |
235 | 235 | |
236 | - $this['generator.variableProvider'] = $this->factory(function (Container $c) { |
|
236 | + $this['generator.variableProvider'] = $this->factory(function(Container $c) { |
|
237 | 237 | $provider = new VariableProvider($c['parser']); |
238 | 238 | |
239 | 239 | $profile = $c['profile']; |
240 | 240 | $options = $profile->generatorOptions(); |
241 | - if(! isset($options['translator']) || $options['translator'] === 'prefix') |
|
241 | + if( ! isset($options['translator']) || $options['translator'] === 'prefix') |
|
242 | 242 | { |
243 | 243 | $provider->setNameTranslator($c['generator.nameTranslator']); |
244 | 244 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | return $provider; |
247 | 247 | }); |
248 | 248 | |
249 | - $this['configurationFilesGenerator'] = static function (Container $c) { |
|
249 | + $this['configurationFilesGenerator'] = static function(Container $c) { |
|
250 | 250 | return new YamlGenerator($c['generate.sources.fileSystem'], $c['configuration'], $c['generator.variableProvider']); |
251 | 251 | }; |
252 | 252 | } |