Completed
Branch feature/pre-split (d27030)
by Anton
04:29
created
source/Spiral/Reactor/ClassDeclaration/ParameterDeclaration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,15 +143,15 @@
 block discarded – undo
143 143
     {
144 144
         $type = '';
145 145
         if (!empty($this->type)) {
146
-            $type = $this->type . " ";
146
+            $type = $this->type." ";
147 147
         }
148 148
 
149
-        $result = $type . ($this->pdb ? '&' : '') . "$" . $this->getName();
149
+        $result = $type.($this->pdb ? '&' : '')."$".$this->getName();
150 150
 
151 151
         if (!$this->isOptional) {
152 152
             return $result;
153 153
         }
154 154
 
155
-        return $result . ' = ' . $this->getSerializer()->serialize($this->defaultValue);
155
+        return $result.' = '.$this->getSerializer()->serialize($this->defaultValue);
156 156
     }
157 157
 }
158 158
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/ConstantDeclaration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,12 +75,12 @@
 block discarded – undo
75 75
     {
76 76
         $result = '';
77 77
         if (!$this->docComment->isEmpty()) {
78
-            $result .= $this->docComment->render($indentLevel) . "\n";
78
+            $result .= $this->docComment->render($indentLevel)."\n";
79 79
         }
80 80
 
81 81
         $result .= $this->addIndent("const {$this->getName()} = ", $indentLevel);
82 82
 
83 83
         //todo: make indent level work
84
-        return $result . $this->getSerializer()->serialize($this->value);
84
+        return $result.$this->getSerializer()->serialize($this->value);
85 85
     }
86 86
 }
87 87
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration/MethodDeclaration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     {
135 135
         $result = '';
136 136
         if (!$this->docComment->isEmpty()) {
137
-            $result .= $this->docComment->render($indentLevel) . "\n";
137
+            $result .= $this->docComment->render($indentLevel)."\n";
138 138
         }
139 139
 
140 140
         $method = "{$this->getAccess()} function {$this->getName()}";
@@ -144,11 +144,11 @@  discard block
 block discarded – undo
144 144
             $method .= "()";
145 145
         }
146 146
 
147
-        $result .= $this->addIndent($method, $indentLevel) . "\n";
148
-        $result .= $this->addIndent('{', $indentLevel) . "\n";
147
+        $result .= $this->addIndent($method, $indentLevel)."\n";
148
+        $result .= $this->addIndent('{', $indentLevel)."\n";
149 149
 
150 150
         if (!$this->source->isEmpty()) {
151
-            $result .= $this->source->render($indentLevel + 1) . "\n";
151
+            $result .= $this->source->render($indentLevel + 1)."\n";
152 152
         }
153 153
 
154 154
         $result .= $this->addIndent("}", $indentLevel);
Please login to merge, or discard this patch.
source/Spiral/Reactor/ClassDeclaration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
         $result = '';
294 294
 
295 295
         if (!$this->docComment->isEmpty()) {
296
-            $result .= $this->docComment->render($indentLevel) . "\n";
296
+            $result .= $this->docComment->render($indentLevel)."\n";
297 297
         }
298 298
 
299 299
         //Class header
@@ -309,27 +309,27 @@  discard block
 block discarded – undo
309 309
             $header .= " implements {$interfaces}";
310 310
         }
311 311
 
312
-        $result .= $this->addIndent($header, $indentLevel) . "\n";
313
-        $result .= $this->addIndent("{", $indentLevel) . "\n";
312
+        $result .= $this->addIndent($header, $indentLevel)."\n";
313
+        $result .= $this->addIndent("{", $indentLevel)."\n";
314 314
 
315 315
         //Rendering content
316 316
         if (!empty($this->traits)) {
317
-            $result .= $this->renderTraits($indentLevel + 1) . "\n\n";
317
+            $result .= $this->renderTraits($indentLevel + 1)."\n\n";
318 318
         }
319 319
 
320 320
         if (!$this->constants->isEmpty()) {
321
-            $result .= $this->constants->render($indentLevel + 1) . "\n\n";
321
+            $result .= $this->constants->render($indentLevel + 1)."\n\n";
322 322
         }
323 323
 
324 324
         if (!$this->properties->isEmpty()) {
325
-            $result .= $this->properties->render($indentLevel + 1) . "\n\n";
325
+            $result .= $this->properties->render($indentLevel + 1)."\n\n";
326 326
         }
327 327
 
328 328
         if (!$this->methods->isEmpty()) {
329
-            $result .= $this->methods->render($indentLevel + 1) . "\n\n";
329
+            $result .= $this->methods->render($indentLevel + 1)."\n\n";
330 330
         }
331 331
 
332
-        $result = rtrim($result, "\n") . "\n";
332
+        $result = rtrim($result, "\n")."\n";
333 333
         $result .= $this->addIndent("}", $indentLevel);
334 334
 
335 335
         return $result;
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/QueryCompiler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                 $table,
29 29
                 $columns,
30 30
                 $rowsets
31
-            ) . (!empty($primaryKey) ? ' RETURNING ' . $this->quote($primaryKey) : '');
31
+            ).(!empty($primaryKey) ? ' RETURNING '.$this->quote($primaryKey) : '');
32 32
     }
33 33
 
34 34
     /**
@@ -40,6 +40,6 @@  discard block
 block discarded – undo
40 40
             return '';
41 41
         }
42 42
 
43
-        return 'DISTINCT' . (is_string($distinct) ? '(' . $this->quote($distinct) . ')' : '');
43
+        return 'DISTINCT'.(is_string($distinct) ? '('.$this->quote($distinct).')' : '');
44 44
     }
45 45
 }
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/Postgres/PostgresInsertQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         }
36 36
 
37 37
         //Resolve table primary key if any
38
-        $primary = $driver->getPrimary($this->database->getPrefix() . $this->table);
38
+        $primary = $driver->getPrimary($this->database->getPrefix().$this->table);
39 39
 
40 40
         if (empty($compiler)) {
41 41
             $compiler = $this->compiler->resetQuoter();
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Quoter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     protected function expression(string $identifier): string
96 96
     {
97
-        return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function ($match) {
97
+        return preg_replace_callback('/([a-z][0-9_a-z\.]*\(?)/i', function($match) {
98 98
             $identifier = $match[1];
99 99
 
100 100
             //Function name
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     protected function aliasing(string $identifier, string $alias, bool $isTable): string
119 119
     {
120
-        $quoted = $this->quote($identifier, $isTable) . ' AS ' . $this->driver->identifier($alias);
120
+        $quoted = $this->quote($identifier, $isTable).' AS '.$this->driver->identifier($alias);
121 121
 
122 122
         if ($isTable && strpos($identifier, '.') === false) {
123 123
             //We have to apply operation post factum to prevent self aliasing (name AS name)
@@ -154,12 +154,12 @@  discard block
 block discarded – undo
154 154
     protected function unpaired(string $identifier, bool $isTable): string
155 155
     {
156 156
         if ($isTable && !isset($this->aliases[$identifier])) {
157
-            if (!isset($this->aliases[$this->prefix . $identifier])) {
157
+            if (!isset($this->aliases[$this->prefix.$identifier])) {
158 158
                 //Generating our alias
159
-                $this->aliases[$this->prefix . $identifier] = $identifier;
159
+                $this->aliases[$this->prefix.$identifier] = $identifier;
160 160
             }
161 161
 
162
-            $identifier = $this->prefix . $identifier;
162
+            $identifier = $this->prefix.$identifier;
163 163
         }
164 164
 
165 165
         return $this->driver->identifier($identifier);
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/AbstractIndex.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
     protected function generateName()
163 163
     {
164 164
         //We can generate name
165
-        $name = $this->table->getName() . '_index_' . implode('_', $this->columns) . '_' . uniqid();
165
+        $name = $this->table->getName().'_index_'.implode('_', $this->columns).'_'.uniqid();
166 166
 
167 167
         if (strlen($name) > 64) {
168 168
             //Many dbs has limitations on identifier length
Please login to merge, or discard this patch.
source/Spiral/Database/Schemas/AbstractCommander.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         if (!empty($table->getPrimaryKeys())) {
286 286
             $primaryKeys = array_map([$this, 'quote'], $table->getPrimaryKeys());
287 287
 
288
-            $innerStatement[] = 'PRIMARY KEY (' . implode(', ', $primaryKeys) . ')';
288
+            $innerStatement[] = 'PRIMARY KEY ('.implode(', ', $primaryKeys).')';
289 289
         }
290 290
 
291 291
         //Constraints and foreign keys
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
             $innerStatement[] = $reference->sqlStatement();
294 294
         }
295 295
 
296
-        $statement[] = '    ' . implode(",\n    ", $innerStatement);
296
+        $statement[] = '    '.implode(",\n    ", $innerStatement);
297 297
         $statement[] = ')';
298 298
 
299 299
         return implode("\n", $statement);
Please login to merge, or discard this patch.