Completed
Push — master ( b13107...84196b )
by Anton
04: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/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/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/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.