Completed
Branch feature/pre-split (a35c5b)
by Anton
03:21
created
source/Spiral/Cache/Stores/FileStore.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @param int $expiration Current expiration time value in seconds (reference).
84 84
      */
85
-    public function get(string $name, int &$expiration = null)
85
+    public function get(string $name, int & $expiration = null)
86 86
     {
87 87
         if (!$this->files->exists($filename = $this->makeFilename($name))) {
88 88
             return null;
@@ -179,6 +179,6 @@  discard block
 block discarded – undo
179 179
      */
180 180
     protected function makeFilename(string $name): string
181 181
     {
182
-        return $this->directory . md5($name) . '.' . $this->extension;
182
+        return $this->directory.md5($name).'.'.$this->extension;
183 183
     }
184 184
 }
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 
135 135
         if (!$hideHeader && !empty($name)) {
136 136
             //Showing element name (if any provided)
137
-            $header = $indent . $this->style->apply($name, 'name');
137
+            $header = $indent.$this->style->apply($name, 'name');
138 138
 
139 139
             //Showing equal sing
140 140
             $header .= $this->style->apply(' = ', 'syntax', '=');
@@ -144,24 +144,24 @@  discard block
 block discarded – undo
144 144
 
145 145
         if ($level > $this->maxLevel) {
146 146
             //Dumper is not reference based, we can't dump too deep values
147
-            return $indent . $this->style->apply('-too deep-', 'maxLevel') . "\n";
147
+            return $indent.$this->style->apply('-too deep-', 'maxLevel')."\n";
148 148
         }
149 149
 
150 150
         $type = strtolower(gettype($value));
151 151
 
152 152
         if ($type == 'array') {
153
-            return $header . $this->dumpArray($value, $level, $hideHeader);
153
+            return $header.$this->dumpArray($value, $level, $hideHeader);
154 154
         }
155 155
 
156 156
         if ($type == 'object') {
157
-            return $header . $this->dumpObject($value, $level, $hideHeader);
157
+            return $header.$this->dumpObject($value, $level, $hideHeader);
158 158
         }
159 159
 
160 160
         if ($type == 'resource') {
161 161
             //No need to dump resource value
162
-            $element = get_resource_type($value) . ' resource ';
162
+            $element = get_resource_type($value).' resource ';
163 163
 
164
-            return $header . $this->style->apply($element, 'type', 'resource') . "\n";
164
+            return $header.$this->style->apply($element, 'type', 'resource')."\n";
165 165
         }
166 166
 
167 167
         //Value length
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         }
189 189
 
190 190
         //Including value
191
-        return $header . ' ' . $this->style->apply($element, 'value', $type) . "\n";
191
+        return $header.' '.$this->style->apply($element, 'value', $type)."\n";
192 192
     }
193 193
 
194 194
     /**
@@ -206,8 +206,8 @@  discard block
 block discarded – undo
206 206
             $count = count($array);
207 207
 
208 208
             //Array size and scope
209
-            $output = $this->style->apply("array({$count})", 'type', 'array') . "\n";
210
-            $output .= $indent . $this->style->apply('[', 'syntax', '[') . "\n";
209
+            $output = $this->style->apply("array({$count})", 'type', 'array')."\n";
210
+            $output .= $indent.$this->style->apply('[', 'syntax', '[')."\n";
211 211
         } else {
212 212
             $output = '';
213 213
         }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 
227 227
         if (!$hideHeader) {
228 228
             //Closing array scope
229
-            $output .= $indent . $this->style->apply(']', 'syntax', ']') . "\n";
229
+            $output .= $indent.$this->style->apply(']', 'syntax', ']')."\n";
230 230
         }
231 231
 
232 232
         return $output;
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
         $indent = $this->style->indent($level);
250 250
 
251 251
         if (!$hideHeader) {
252
-            $type = ($class ?: get_class($object)) . ' object ';
252
+            $type = ($class ?: get_class($object)).' object ';
253 253
 
254
-            $header = $this->style->apply($type, 'type', 'object') . "\n";
255
-            $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n";
254
+            $header = $this->style->apply($type, 'type', 'object')."\n";
255
+            $header .= $indent.$this->style->apply('(', 'syntax', '(')."\n";
256 256
         } else {
257 257
             $header = '';
258 258
         }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 
274 274
             return $header
275 275
                 . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
276
-                . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
276
+                . $indent.$this->style->apply(')', 'syntax', ')')."\n";
277 277
         }
278 278
 
279 279
         if ($object instanceof \Closure) {
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         }
290 290
 
291 291
         //Header, content, footer
292
-        return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
292
+        return $header.$output.$indent.$this->style->apply(')', 'syntax', ')')."\n";
293 293
     }
294 294
 
295 295
     /**
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
         }
326 326
 
327 327
         //Property name includes access level
328
-        $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access);
328
+        $name = $property->getName().$this->style->apply(':'.$access, 'access', $access);
329 329
 
330 330
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
331 331
     }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      */
86 86
     public function dump($value, int $output = self::OUTPUT_ECHO): string
87 87
     {
88
-         switch ($output) {
88
+            switch ($output) {
89 89
             case self::OUTPUT_ECHO:
90 90
                 echo $this->style->wrapContainer($this->dumpValue($value, '', 0));
91 91
                 break;
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@
 block discarded – undo
345 345
      */
346 346
     public function hasTable(string $name): bool
347 347
     {
348
-        return $this->driver->hasTable($this->prefix . $name);
348
+        return $this->driver->hasTable($this->prefix.$name);
349 349
     }
350 350
 
351 351
     /**
Please login to merge, or discard this patch.
source/Spiral/Tokenizer/Isolator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             if ($this->isCloseTag($token)) {
74 74
                 $blockID = $this->uniqueID();
75 75
 
76
-                $this->phpBlocks[$blockID] = $phpBlock . $token[1];
76
+                $this->phpBlocks[$blockID] = $phpBlock.$token[1];
77 77
                 $isolated .= $this->placeholder($blockID);
78 78
 
79 79
                 $phpBlock = '';
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     {
139 139
         return preg_replace_callback(
140 140
             $this->blockRegex(),
141
-            function ($match) use ($partial, $blockIDs) {
141
+            function($match) use ($partial, $blockIDs) {
142 142
                 if ($partial && !in_array($match['id'], $blockIDs)) {
143 143
                     return $match[0];
144 144
                 }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     private function blockRegex(): string
181 181
     {
182
-        return '/' .
182
+        return '/'.
183 183
             preg_quote($this->prefix)
184 184
             . '(?P<id>[0-9a-z]+)'
185 185
             . preg_quote($this->postfix)
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     private function uniqueID(): string
193 193
     {
194
-        return md5(count($this->phpBlocks) . uniqid(true));
194
+        return md5(count($this->phpBlocks).uniqid(true));
195 195
     }
196 196
 
197 197
     /**
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     private function placeholder(string $blockID): string
203 203
     {
204
-        return $this->prefix . $blockID . $this->postfix;
204
+        return $this->prefix.$blockID.$this->postfix;
205 205
     }
206 206
 
207 207
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/Prototypes/AbstractReference.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         string $column = 'id',
156 156
         bool $forcePrefix = true
157 157
     ): AbstractReference {
158
-        $this->foreignTable = ($forcePrefix ? $this->tablePrefix : '') . $table;
158
+        $this->foreignTable = ($forcePrefix ? $this->tablePrefix : '').$table;
159 159
         $this->foreignKey = $column;
160 160
 
161 161
         return $this;
@@ -203,10 +203,10 @@  discard block
 block discarded – undo
203 203
         $statement[] = 'CONSTRAINT';
204 204
         $statement[] = $driver->identifier($this->name);
205 205
         $statement[] = 'FOREIGN KEY';
206
-        $statement[] = '(' . $driver->identifier($this->column) . ')';
206
+        $statement[] = '('.$driver->identifier($this->column).')';
207 207
 
208
-        $statement[] = 'REFERENCES ' . $driver->identifier($this->foreignTable);
209
-        $statement[] = '(' . $driver->identifier($this->foreignKey) . ')';
208
+        $statement[] = 'REFERENCES '.$driver->identifier($this->foreignTable);
209
+        $statement[] = '('.$driver->identifier($this->foreignKey).')';
210 210
 
211 211
         $statement[] = "ON DELETE {$this->deleteRule}";
212 212
         $statement[] = "ON UPDATE {$this->updateRule}";
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/Schemas/MySQLColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
 
201 201
         //Fetching enum values
202 202
         if ($column->abstractType() == 'enum' && !empty($options)) {
203
-            $column->enumValues = array_map(function ($value) {
203
+            $column->enumValues = array_map(function($value) {
204 204
                 return trim($value, $value[0]);
205 205
             }, explode(',', $options));
206 206
 
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,6 +89,6 @@
 block discarded – undo
89 89
             throw new SchemaException("MySQL commander can process only MySQL tables.");
90 90
         }
91 91
 
92
-        return parent::createStatement($table) . " ENGINE {$table->getEngine()}";
92
+        return parent::createStatement($table)." ENGINE {$table->getEngine()}";
93 93
     }
94 94
 }
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/MySQL/MySQLCompiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $statement = '';
55 55
         if (!empty($limit) || !empty($offset)) {
56 56
             //When limit is not provided but offset does we can replace limit value with PHP_INT_MAX
57
-            $statement = 'LIMIT ' . ($limit ?: '18446744073709551615') . ' ';
57
+            $statement = 'LIMIT '.($limit ?: '18446744073709551615').' ';
58 58
         }
59 59
 
60 60
         if (!empty($offset)) {
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLite/SQLiteCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                     $selectColumns[] = "? AS {$this->quote($column)}";
36 36
                 }
37 37
 
38
-                $statement[] = 'SELECT ' . implode(', ', $selectColumns);
38
+                $statement[] = 'SELECT '.implode(', ', $selectColumns);
39 39
             } else {
40
-                $statement[] = 'UNION SELECT ' . trim(str_repeat('?, ', count($columns)), ', ');
40
+                $statement[] = 'UNION SELECT '.trim(str_repeat('?, ', count($columns)), ', ');
41 41
             }
42 42
         }
43 43
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $statement = '';
59 59
 
60 60
         if (!empty($limit) || !empty($offset)) {
61
-            $statement = 'LIMIT ' . ($limit ?: '-1') . ' ';
61
+            $statement = 'LIMIT '.($limit ?: '-1').' ';
62 62
         }
63 63
 
64 64
         if (!empty($offset)) {
Please login to merge, or discard this patch.