Completed
Push — master ( 667eb8...379582 )
by Anton
04:04
created
source/Spiral/ORM/EntityMap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
         }
63 63
 
64 64
         if (empty($entity->primaryKey())) {
65
-            throw new MapException("Unable to store non identified entity " . get_class($entity));
65
+            throw new MapException("Unable to store non identified entity ".get_class($entity));
66 66
         }
67 67
 
68
-        $cacheID = get_class($entity) . ':' . $entity->primaryKey();
68
+        $cacheID = get_class($entity).':'.$entity->primaryKey();
69 69
 
70 70
         return $this->entities[$cacheID] = $entity;
71 71
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function forget(RecordInterface $entity)
79 79
     {
80
-        $cacheID = get_class($entity) . ':' . $entity->primaryKey();
80
+        $cacheID = get_class($entity).':'.$entity->primaryKey();
81 81
         unset($this->entities[$cacheID]);
82 82
     }
83 83
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Schemas/SchemaLocator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
             $schemas[] = $this->container->get(FactoryInterface::class)->make(
62 62
                 RecordSchema::class,
63
-                ['reflection' => new ReflectionEntity($class['name']),]
63
+                ['reflection' => new ReflectionEntity($class['name']), ]
64 64
             );
65 65
         }
66 66
 
Please login to merge, or discard this patch.
source/Spiral/ODM/Schemas/SchemaLocator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
 
59 59
             $schemas[] = $this->container->get(FactoryInterface::class)->make(
60 60
                 DocumentSchema::class,
61
-                ['reflection' => new ReflectionEntity($class['name']),]
61
+                ['reflection' => new ReflectionEntity($class['name']), ]
62 62
             );
63 63
         }
64 64
 
Please login to merge, or discard this patch.
source/Spiral/Storage/Servers/RackspaceServer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@  discard block
 block discarded – undo
85 85
 
86 86
         if (!empty($this->cache) && $this->options['cache']) {
87 87
             $this->authToken = $this->cache->get(
88
-                $this->options['username'] . '@rackspace-token'
88
+                $this->options['username'].'@rackspace-token'
89 89
             );
90 90
 
91 91
             $this->regions = (array)$this->cache->get(
92
-                $this->options['username'] . '@rackspace-regions'
92
+                $this->options['username'].'@rackspace-regions'
93 93
             );
94 94
         }
95 95
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     public function exists(
120 120
         BucketInterface $bucket,
121 121
         string $name,
122
-        ResponseInterface &$response = null
122
+        ResponseInterface & $response = null
123 123
     ): bool {
124 124
         try {
125 125
             $response = $this->client->send($this->buildRequest('HEAD', $bucket, $name));
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         try {
246 246
             $request = $this->buildRequest('PUT', $bucket, $newName, [
247
-                'X-Copy-From'    => '/' . $bucket->getOption('container') . '/' . rawurlencode($oldName),
247
+                'X-Copy-From'    => '/'.$bucket->getOption('container').'/'.rawurlencode($oldName),
248 248
                 'Content-Length' => 0
249 249
             ]);
250 250
 
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 
282 282
         try {
283 283
             $request = $this->buildRequest('PUT', $destination, $name, [
284
-                'X-Copy-From'    => '/' . $bucket->getOption('container') . '/' . rawurlencode($name),
284
+                'X-Copy-From'    => '/'.$bucket->getOption('container').'/'.rawurlencode($name),
285 285
                 'Content-Length' => 0
286 286
             ]);
287 287
 
@@ -357,13 +357,13 @@  discard block
 block discarded – undo
357 357
 
358 358
         if (!empty($this->cache) && $this->options['cache']) {
359 359
             $this->cache->set(
360
-                $username . '@rackspace-token',
360
+                $username.'@rackspace-token',
361 361
                 $this->authToken,
362 362
                 $this->options['lifetime']
363 363
             );
364 364
 
365 365
             $this->cache->set(
366
-                $username . '@rackspace-regions',
366
+                $username.'@rackspace-regions',
367 367
                 $this->regions,
368 368
                 $this->options['lifetime']
369 369
             );
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
         }
403 403
 
404 404
         return new Uri(
405
-            $this->regions[$region] . '/' . $bucket->getOption('container') . '/' . rawurlencode($name)
405
+            $this->regions[$region].'/'.$bucket->getOption('container').'/'.rawurlencode($name)
406 406
         );
407 407
     }
408 408
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Nodes/PivotedRootNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,6 @@
 block discarded – undo
106 106
         $pivotData = $data[ORMInterface::PIVOT_DATA];
107 107
 
108 108
         //Unique row criteria
109
-        return $pivotData[$this->innerPivotKey] . '.' . $pivotData[$this->outerPivotKey];
109
+        return $pivotData[$this->innerPivotKey].'.'.$pivotData[$this->outerPivotKey];
110 110
     }
111 111
 }
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/BelongsToRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
         if (!$this->isSynced($this->parent, $this->instance)) {
81 81
             //Syncing FKs before primary command been executed
82
-            $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) {
82
+            $innerCommand->onExecute(function($innerCommand) use ($parentCommand) {
83 83
                 $parentCommand->addContext(
84 84
                     $this->key(Record::INNER_KEY),
85 85
                     $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand)
Please login to merge, or discard this patch.
source/Spiral/Debug/Dumper.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         if (!$hideHeader && !empty($name)) {
129 129
             //Showing element name (if any provided)
130
-            $header = $indent . $this->style->apply($name, 'name');
130
+            $header = $indent.$this->style->apply($name, 'name');
131 131
 
132 132
             //Showing equal sing
133 133
             $header .= $this->style->apply(' = ', 'syntax', '=');
@@ -137,24 +137,24 @@  discard block
 block discarded – undo
137 137
 
138 138
         if ($level > $this->maxLevel) {
139 139
             //Dumper is not reference based, we can't dump too deep values
140
-            return $indent . $this->style->apply('-too deep-', 'maxLevel') . "\n";
140
+            return $indent.$this->style->apply('-too deep-', 'maxLevel')."\n";
141 141
         }
142 142
 
143 143
         $type = strtolower(gettype($value));
144 144
 
145 145
         if ($type == 'array') {
146
-            return $header . $this->dumpArray($value, $level, $hideHeader);
146
+            return $header.$this->dumpArray($value, $level, $hideHeader);
147 147
         }
148 148
 
149 149
         if ($type == 'object') {
150
-            return $header . $this->dumpObject($value, $level, $hideHeader);
150
+            return $header.$this->dumpObject($value, $level, $hideHeader);
151 151
         }
152 152
 
153 153
         if ($type == 'resource') {
154 154
             //No need to dump resource value
155
-            $element = get_resource_type($value) . ' resource ';
155
+            $element = get_resource_type($value).' resource ';
156 156
 
157
-            return $header . $this->style->apply($element, 'type', 'resource') . "\n";
157
+            return $header.$this->style->apply($element, 'type', 'resource')."\n";
158 158
         }
159 159
 
160 160
         //Value length
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         }
182 182
 
183 183
         //Including value
184
-        return $header . ' ' . $this->style->apply($element, 'value', $type) . "\n";
184
+        return $header.' '.$this->style->apply($element, 'value', $type)."\n";
185 185
     }
186 186
 
187 187
     /**
@@ -199,8 +199,8 @@  discard block
 block discarded – undo
199 199
             $count = count($array);
200 200
 
201 201
             //Array size and scope
202
-            $output = $this->style->apply("array({$count})", 'type', 'array') . "\n";
203
-            $output .= $indent . $this->style->apply('[', 'syntax', '[') . "\n";
202
+            $output = $this->style->apply("array({$count})", 'type', 'array')."\n";
203
+            $output .= $indent.$this->style->apply('[', 'syntax', '[')."\n";
204 204
         } else {
205 205
             $output = '';
206 206
         }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
         if (!$hideHeader) {
221 221
             //Closing array scope
222
-            $output .= $indent . $this->style->apply(']', 'syntax', ']') . "\n";
222
+            $output .= $indent.$this->style->apply(']', 'syntax', ']')."\n";
223 223
         }
224 224
 
225 225
         return $output;
@@ -242,10 +242,10 @@  discard block
 block discarded – undo
242 242
         $indent = $this->style->indent($level);
243 243
 
244 244
         if (!$hideHeader) {
245
-            $type = ($class ?: get_class($object)) . ' object ';
245
+            $type = ($class ?: get_class($object)).' object ';
246 246
 
247
-            $header = $this->style->apply($type, 'type', 'object') . "\n";
248
-            $header .= $indent . $this->style->apply('(', 'syntax', '(') . "\n";
247
+            $header = $this->style->apply($type, 'type', 'object')."\n";
248
+            $header .= $indent.$this->style->apply('(', 'syntax', '(')."\n";
249 249
         } else {
250 250
             $header = '';
251 251
         }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
             return $header
272 272
                 . $this->dumpValue($debugInfo, '', $level + (is_scalar($object)), true)
273
-                . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
273
+                . $indent.$this->style->apply(')', 'syntax', ')')."\n";
274 274
         }
275 275
 
276 276
         $refection = new \ReflectionObject($object);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         }
282 282
 
283 283
         //Header, content, footer
284
-        return $header . $output . $indent . $this->style->apply(')', 'syntax', ')') . "\n";
284
+        return $header.$output.$indent.$this->style->apply(')', 'syntax', ')')."\n";
285 285
     }
286 286
 
287 287
     /**
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             $name = $this->style->apply($property->getName(), 'dynamic');
317 317
         } else {
318 318
             //Property name includes access level
319
-            $name = $property->getName() . $this->style->apply(':' . $access, 'access', $access);
319
+            $name = $property->getName().$this->style->apply(':'.$access, 'access', $access);
320 320
         }
321 321
 
322 322
         return $this->dumpValue($property->getValue($object), $name, $level + 1);
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         $reflection = new \ReflectionFunction($closure);
335 335
 
336 336
         return [
337
-            'name' => $reflection->getName() . " (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})",
337
+            'name' => $reflection->getName()." (lines {$reflection->getStartLine()}:{$reflection->getEndLine()})",
338 338
             'file' => $reflection->getFileName(),
339 339
             'this' => $reflection->getClosureThis()
340 340
         ];
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/ManyToManyRelation.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
             }
284 284
 
285 285
             //Syncing pivot data values
286
-            $command->onComplete(function (ContextualCommandInterface $command) use ($record) {
286
+            $command->onComplete(function(ContextualCommandInterface $command) use ($record) {
287 287
                 //Now when we are done we can sync our values with current data
288 288
                 $this->pivotData->offsetSet(
289 289
                     $record,
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         ContextualCommandInterface $outerCommand
331 331
     ) {
332 332
         //Parent record dependency
333
-        $parentCommand->onExecute(function ($parentCommand) use ($pivotCommand, $parent) {
333
+        $parentCommand->onExecute(function($parentCommand) use ($pivotCommand, $parent) {
334 334
             $pivotCommand->addContext(
335 335
                 $this->key(Record::THOUGHT_INNER_KEY),
336 336
                 $this->lookupKey(Record::INNER_KEY, $parent, $parentCommand)
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
         });
339 339
 
340 340
         //Outer record dependency
341
-        $outerCommand->onExecute(function ($outerCommand) use ($pivotCommand, $outer) {
341
+        $outerCommand->onExecute(function($outerCommand) use ($pivotCommand, $outer) {
342 342
             $pivotCommand->addContext(
343 343
                 $this->key(Record::THOUGHT_OUTER_KEY),
344 344
                 $this->lookupKey(Record::OUTER_KEY, $outer, $outerCommand)
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             $loader,
405 405
             [
406 406
                 'alias'      => $table->getName(),
407
-                'pivotAlias' => $table->getName() . '_pivot',
407
+                'pivotAlias' => $table->getName().'_pivot',
408 408
                 'method'     => RelationLoader::POSTLOAD
409 409
             ]
410 410
         );
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $query = $loader->configureQuery($query, [$innerKey]);
415 415
 
416 416
         //Additional pivot conditions
417
-        $pivotDecorator = new WhereDecorator($query, 'onWhere', $table->getName() . '_pivot');
417
+        $pivotDecorator = new WhereDecorator($query, 'onWhere', $table->getName().'_pivot');
418 418
         $pivotDecorator->where($this->schema[Record::WHERE_PIVOT]);
419 419
 
420 420
         //Additional where conditions!
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
     {
480 480
         if ($diff = array_diff(array_keys($pivotData), $this->schema[Record::PIVOT_COLUMNS])) {
481 481
             throw new RelationException(
482
-                "Invalid pivot data, undefined columns found: " . join(', ', $diff)
482
+                "Invalid pivot data, undefined columns found: ".join(', ', $diff)
483 483
             );
484 484
         }
485 485
     }
Please login to merge, or discard this patch.
source/Spiral/Migrations/Atomizer/MigrationRenderer.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
     protected function declareIndexes(Source $source, StateComparator $comparator)
134 134
     {
135 135
         foreach ($comparator->addedIndexes() as $index) {
136
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
137
-            $source->addString("    ->addIndex({$columns}, " . $this->indexOptions($index) . ")");
136
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
137
+            $source->addString("    ->addIndex({$columns}, ".$this->indexOptions($index).")");
138 138
         }
139 139
 
140 140
         foreach ($comparator->alteredIndexes() as $pair) {
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
              */
144 144
             $index = $pair[self::NEW_STATE];
145 145
 
146
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
147
-            $source->addString("    ->alterIndex({$columns}, " . $this->indexOptions($index) . ")");
146
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
147
+            $source->addString("    ->alterIndex({$columns}, ".$this->indexOptions($index).")");
148 148
         }
149 149
 
150 150
         foreach ($comparator->droppedIndexes() as $index) {
151
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
151
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
152 152
             $source->addString("    ->dropIndex({$columns})");
153 153
         }
154 154
     }
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
     ) {
166 166
         foreach ($comparator->addedForeigns() as $foreign) {
167 167
             $column = "'{$foreign->getColumn()}'";
168
-            $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'";
168
+            $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'";
169 169
             $key = "'{$foreign->getForeignKey()}'";
170 170
 
171 171
             $source->addString(
172
-                "    ->addForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")"
172
+                "    ->addForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")"
173 173
             );
174 174
         }
175 175
 
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
             $foreign = $pair[self::NEW_STATE];
181 181
 
182 182
             $column = "'{$foreign->getColumn()}'";
183
-            $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'";
183
+            $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'";
184 184
             $key = "'{$foreign->getForeignKey()}'";
185 185
 
186 186
             $source->addString(
187
-                "    ->alterForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")"
187
+                "    ->alterForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")"
188 188
             );
189 189
         }
190 190
 
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
     protected function revertIndexes(Source $source, StateComparator $comparator)
231 231
     {
232 232
         foreach ($comparator->droppedIndexes() as $index) {
233
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
234
-            $source->addString("    ->addIndex({$columns}, " . $this->indexOptions($index) . ")");
233
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
234
+            $source->addString("    ->addIndex({$columns}, ".$this->indexOptions($index).")");
235 235
         }
236 236
 
237 237
         foreach ($comparator->alteredIndexes() as $pair) {
@@ -240,12 +240,12 @@  discard block
 block discarded – undo
240 240
              */
241 241
             $index = $pair[self::ORIGINAL_STATE];
242 242
 
243
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
244
-            $source->addString("    ->alterIndex({$columns}, " . $this->indexOptions($index) . ")");
243
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
244
+            $source->addString("    ->alterIndex({$columns}, ".$this->indexOptions($index).")");
245 245
         }
246 246
 
247 247
         foreach ($comparator->addedIndexes() as $index) {
248
-            $columns = '[\'' . join('\', \'', $index->getColumns()) . '\']';
248
+            $columns = '[\''.join('\', \'', $index->getColumns()).'\']';
249 249
             $source->addString("    ->dropIndex({$columns})");
250 250
         }
251 251
     }
@@ -262,11 +262,11 @@  discard block
 block discarded – undo
262 262
     ) {
263 263
         foreach ($comparator->droppedForeigns() as $foreign) {
264 264
             $column = "'{$foreign->getColumn()}'";
265
-            $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'";
265
+            $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'";
266 266
             $key = "'{$foreign->getForeignKey()}'";
267 267
 
268 268
             $source->addString(
269
-                "    ->addForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")"
269
+                "    ->addForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")"
270 270
             );
271 271
         }
272 272
 
@@ -277,11 +277,11 @@  discard block
 block discarded – undo
277 277
             $foreign = $pair[self::ORIGINAL_STATE];
278 278
 
279 279
             $column = "'{$foreign->getColumn()}'";
280
-            $table = "'" . substr($foreign->getForeignTable(), strlen($prefix)) . "'";
280
+            $table = "'".substr($foreign->getForeignTable(), strlen($prefix))."'";
281 281
             $key = "'{$foreign->getForeignKey()}'";
282 282
 
283 283
             $source->addString(
284
-                "    ->alterForeignKey({$column}, {$table}, {$key}, " . $this->foreignOptions($foreign) . ")"
284
+                "    ->alterForeignKey({$column}, {$table}, {$key}, ".$this->foreignOptions($foreign).")"
285 285
             );
286 286
         }
287 287
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
     {
360 360
         $lines = explode("\n", $serialized);
361 361
         foreach ($lines as &$line) {
362
-            $line = "    " . $line;
362
+            $line = "    ".$line;
363 363
             unset($line);
364 364
         }
365 365
 
Please login to merge, or discard this patch.