Completed
Push — master ( a8cb34...ce5009 )
by Anton
03:37
created
source/Spiral/ORM/Entities/RelationMap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
             $class = (new \ReflectionClass($accessor->getClass()))->getShortName();
213 213
 
214 214
             //[+] for loaded, [~] for lazy loaded
215
-            $relations[$relation] = $type . '(' . $class . ') [' . ($accessor->isLoaded() ? '+]' : '~]');
215
+            $relations[$relation] = $type.'('.$class.') ['.($accessor->isLoaded() ? '+]' : '~]');
216 216
         }
217 217
 
218 218
         return $relations;
Please login to merge, or discard this patch.
source/Spiral/ORM/RecordEntity.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
      *
98 98
      * @see Record::INDEXES
99 99
      */
100
-    const INDEX  = 1000;            //Default index type
101
-    const UNIQUE = 2000;            //Unique index definition
100
+    const INDEX  = 1000; //Default index type
101
+    const UNIQUE = 2000; //Unique index definition
102 102
 
103 103
     /*
104 104
      * ================================================
@@ -302,11 +302,11 @@  discard block
 block discarded – undo
302 302
         $this->dispatch('insert', new RecordEvent($this, $command));
303 303
 
304 304
         //Executed when transaction successfully completed
305
-        $command->onComplete(function (InsertCommand $command) {
305
+        $command->onComplete(function(InsertCommand $command) {
306 306
             $this->handleInsert($command);
307 307
         });
308 308
 
309
-        $command->onRollBack(function () {
309
+        $command->onRollBack(function() {
310 310
             //Flushing existed insert command to prevent collisions
311 311
             $this->lastInsert = null;
312 312
             $this->state = ORMInterface::STATE_NEW;
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         );
330 330
 
331 331
         if (!empty($this->lastInsert)) {
332
-            $this->lastInsert->onExecute(function (InsertCommand $insert) use ($command) {
332
+            $this->lastInsert->onExecute(function(InsertCommand $insert) use ($command) {
333 333
                 //Sync primary key values
334 334
                 $command->setWhere([$this->primaryColumn() => $insert->getInsertID()]);
335 335
                 $command->setPrimaryKey($insert->getInsertID());
@@ -341,11 +341,11 @@  discard block
 block discarded – undo
341 341
         $this->dispatch('update', new RecordEvent($this));
342 342
 
343 343
         //Executed when transaction successfully completed
344
-        $command->onComplete(function (UpdateCommand $command) {
344
+        $command->onComplete(function(UpdateCommand $command) {
345 345
             $this->handleUpdate($command);
346 346
         });
347 347
 
348
-        $command->onRollBack(function () {
348
+        $command->onRollBack(function() {
349 349
             //Flushing existed insert command to prevent collisions
350 350
             $this->state = ORMInterface::STATE_LOADED;
351 351
         });
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
         if (!empty($this->lastInsert)) {
367 367
             //Sync primary key values
368
-            $this->lastInsert->onExecute(function (InsertCommand $insert) use ($command) {
368
+            $this->lastInsert->onExecute(function(InsertCommand $insert) use ($command) {
369 369
                 $command->setWhere([$this->primaryColumn() => $insert->primaryKey()]);
370 370
             });
371 371
         }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         $this->dispatch('delete', new RecordEvent($this));
376 376
 
377 377
         //Executed when transaction successfully completed
378
-        $command->onComplete(function (DeleteCommand $command) {
378
+        $command->onComplete(function(DeleteCommand $command) {
379 379
             $this->handleDelete($command);
380 380
         });
381 381
 
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/AbstractRelation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,11 +165,11 @@
 block discarded – undo
165 165
             }
166 166
         } elseif (!is_object($value)) {
167 167
             throw new RelationException(
168
-                "Must be an instance of '{$this->class}', '" . gettype($value) . "' given"
168
+                "Must be an instance of '{$this->class}', '".gettype($value)."' given"
169 169
             );
170 170
         } elseif (!is_a($value, $this->class, false)) {
171 171
             throw new RelationException(
172
-                "Must be an instance of '{$this->class}', '" . get_class($value) . "' given"
172
+                "Must be an instance of '{$this->class}', '".get_class($value)."' given"
173 173
             );
174 174
         }
175 175
     }
Please login to merge, or discard this patch.
source/Spiral/ORM/AbstractRecord.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
      */
225 225
     public function __toString()
226 226
     {
227
-        return static::class . '#' . hash('crc32', spl_object_hash($this));
227
+        return static::class.'#'.hash('crc32', spl_object_hash($this));
228 228
     }
229 229
 
230 230
     /**
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/QueryCompiler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
     {
321 321
         $statement = '';
322 322
         foreach ($joinTokens as $table => $join) {
323
-            $statement .= "\n" . $join['type'] . ' JOIN ' . $this->quote($table, true);
323
+            $statement .= "\n".$join['type'].' JOIN '.$this->quote($table, true);
324 324
             $statement .= $this->optional("\n    ON", $this->compileWhere($join['on']));
325 325
         }
326 326
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
                 throw new CompilerException("Invalid sorting direction, only ASC and DESC are allowed");
373 373
             }
374 374
 
375
-            $result[] = $this->quote($order[0]) . ' ' . $direction;
375
+            $result[] = $this->quote($order[0]).' '.$direction;
376 376
         }
377 377
 
378 378
         return implode(', ', $result);
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
             $prefix .= ' ';
539 539
         }
540 540
 
541
-        return $prefix . $expression . $postfix;
541
+        return $prefix.$expression.$postfix;
542 542
     }
543 543
 
544 544
     /**
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
     {
598 598
         if ($context instanceof QueryBuilder) {
599 599
             //Nested queries has to be wrapped with braces
600
-            return '(' . $context->sqlStatement($this) . ')';
600
+            return '('.$context->sqlStatement($this).')';
601 601
         }
602 602
 
603 603
         if ($context instanceof ExpressionInterface) {
Please login to merge, or discard this patch.
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/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/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.