Completed
Push — master ( 667eb8...379582 )
by Anton
04:04
created
source/Spiral/Database/Entities/Driver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             $this->logger()->info("Transaction: new savepoint 'SVP{$name}'");
329 329
         }
330 330
 
331
-        $this->statement('SAVEPOINT ' . $this->identifier("SVP{$name}"));
331
+        $this->statement('SAVEPOINT '.$this->identifier("SVP{$name}"));
332 332
     }
333 333
 
334 334
     /**
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             $this->logger()->info("Transaction: release savepoint 'SVP{$name}'");
346 346
         }
347 347
 
348
-        $this->statement('RELEASE SAVEPOINT ' . $this->identifier("SVP{$name}"));
348
+        $this->statement('RELEASE SAVEPOINT '.$this->identifier("SVP{$name}"));
349 349
     }
350 350
 
351 351
     /**
@@ -362,6 +362,6 @@  discard block
 block discarded – undo
362 362
             $this->logger()->info("Transaction: rollback savepoint 'SVP{$name}'");
363 363
         }
364 364
 
365
-        $this->statement('ROLLBACK TO SAVEPOINT ' . $this->identifier("SVP{$name}"));
365
+        $this->statement('ROLLBACK TO SAVEPOINT '.$this->identifier("SVP{$name}"));
366 366
     }
367 367
 }
Please login to merge, or discard this patch.
source/Spiral/Security/Traits/GuardedTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     {
91 91
         if (defined('static::GUARD_NAMESPACE')) {
92 92
             //Yay! Isolation
93
-            $permission = constant(get_called_class() . '::' . 'GUARD_NAMESPACE') . '.' . $permission;
93
+            $permission = constant(get_called_class().'::'.'GUARD_NAMESPACE').'.'.$permission;
94 94
         }
95 95
 
96 96
         return $permission;
Please login to merge, or discard this patch.
source/Spiral/Migrations/Migrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             $migration = $migration->withCapsule($capsule);
137 137
 
138 138
             //Executing migration inside global transaction
139
-            $this->execute(function () use ($migration) {
139
+            $this->execute(function() use ($migration) {
140 140
                 $migration->up();
141 141
             });
142 142
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             $migration = $migration->withCapsule($capsule);
183 183
 
184 184
             //Executing migration inside global transaction
185
-            $this->execute(function () use ($migration) {
185
+            $this->execute(function() use ($migration) {
186 186
                 $migration->down();
187 187
             });
188 188
 
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
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
      *
124 124
      * @see Record::INDEXES
125 125
      */
126
-    const INDEX  = 1000;            //Default index type
127
-    const UNIQUE = 2000;            //Unique index definition
126
+    const INDEX  = 1000; //Default index type
127
+    const UNIQUE = 2000; //Unique index definition
128 128
 
129 129
     /*
130 130
      * ================================================
@@ -330,12 +330,12 @@  discard block
 block discarded – undo
330 330
         $command = new InsertCommand($this->orm->table(static::class), $data);
331 331
 
332 332
         //Executed when transaction successfully completed
333
-        $command->onComplete(function (InsertCommand $command) {
333
+        $command->onComplete(function(InsertCommand $command) {
334 334
             $this->lastInsert = null;
335 335
             $this->handleInsert($command);
336 336
         });
337 337
 
338
-        $command->onRollBack(function () {
338
+        $command->onRollBack(function() {
339 339
             //Flushing existed insert command to prevent collisions
340 340
             $this->lastInsert = null;
341 341
             $this->state = ORMInterface::STATE_NEW;
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
         );
364 364
 
365 365
         if (!empty($this->lastInsert)) {
366
-            $this->lastInsert->onExecute(function (InsertCommand $insert) use ($command) {
366
+            $this->lastInsert->onExecute(function(InsertCommand $insert) use ($command) {
367 367
                 //Sync primary key values
368 368
                 $command->setWhere([$this->primaryColumn() => $insert->getInsertID()]);
369 369
                 $command->setPrimaryKey($insert->getInsertID());
@@ -371,11 +371,11 @@  discard block
 block discarded – undo
371 371
         }
372 372
 
373 373
         //Executed when transaction successfully completed
374
-        $command->onComplete(function (UpdateCommand $command) {
374
+        $command->onComplete(function(UpdateCommand $command) {
375 375
             $this->handleUpdate($command);
376 376
         });
377 377
 
378
-        $command->onRollBack(function () {
378
+        $command->onRollBack(function() {
379 379
             //Flushing existed insert command to prevent collisions
380 380
             $this->state = ORMInterface::STATE_LOADED;
381 381
         });
@@ -399,13 +399,13 @@  discard block
 block discarded – undo
399 399
 
400 400
         if (!empty($this->lastInsert)) {
401 401
             //Sync primary key values
402
-            $this->lastInsert->onExecute(function (InsertCommand $insert) use ($command) {
402
+            $this->lastInsert->onExecute(function(InsertCommand $insert) use ($command) {
403 403
                 $command->setWhere([$this->primaryColumn() => $insert->primaryKey()]);
404 404
             });
405 405
         }
406 406
 
407 407
         //Executed when transaction successfully completed
408
-        $command->onComplete(function (DeleteCommand $command) {
408
+        $command->onComplete(function(DeleteCommand $command) {
409 409
             $this->handleDelete($command);
410 410
         });
411 411
 
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
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
     public function __toString()
231 231
     {
232 232
         //Do we need to worry about collision rate in this context?
233
-        return static::class . '#' . hash('crc32', spl_object_hash($this));
233
+        return static::class.'#'.hash('crc32', spl_object_hash($this));
234 234
     }
235 235
 
236 236
     /**
Please login to merge, or discard this patch.
source/Spiral/ODM/Helpers/AggregationHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         $query = $aggregation[2];
92 92
 
93 93
         //Mounting selection values
94
-        array_walk_recursive($query, function (&$value) {
94
+        array_walk_recursive($query, function(&$value) {
95 95
             if (strpos($value, 'self::') === 0) {
96 96
                 $value = $this->findValue(substr($value, 6));
97 97
             }
Please login to merge, or discard this patch.
source/Spiral/ODM/DocumentEntity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
             return $helper->createAggregation($method);
238 238
         }
239 239
 
240
-        throw new DocumentException("Undefined method call '{$method}' in '" . get_called_class() . "'");
240
+        throw new DocumentException("Undefined method call '{$method}' in '".get_called_class()."'");
241 241
     }
242 242
 
243 243
     /**
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             if ($value instanceof CompositableInterface) {
304 304
                 $atomics = array_merge_recursive(
305 305
                     $atomics,
306
-                    $value->buildAtomics((!empty($container) ? $container . '.' : '') . $field)
306
+                    $value->buildAtomics((!empty($container) ? $container.'.' : '').$field)
307 307
                 );
308 308
 
309 309
                 continue;
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
             if (array_key_exists($field, $this->changes)) {
320 320
                 //Generating set operation for changed field
321
-                $atomics['$set'][(!empty($container) ? $container . '.' : '') . $field] = $value;
321
+                $atomics['$set'][(!empty($container) ? $container.'.' : '').$field] = $value;
322 322
             }
323 323
         }
324 324
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     {
366 366
         $public = parent::publicValue();
367 367
 
368
-        array_walk_recursive($public, function (&$value) {
368
+        array_walk_recursive($public, function(&$value) {
369 369
             if ($value instanceof ObjectID) {
370 370
                 $value = (string)$value;
371 371
             }
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/DocumentSelector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -359,7 +359,7 @@
 block discarded – undo
359 359
      */
360 360
     protected function normalizeDates(array $query): array
361 361
     {
362
-        array_walk_recursive($query, function (&$value) {
362
+        array_walk_recursive($query, function(&$value) {
363 363
             if ($value instanceof \DateTime) {
364 364
                 //MongoDate is always UTC, which is good :)
365 365
                 $value = new UTCDateTime($value);
Please login to merge, or discard this patch.
source/Spiral/Reactor/Body/Source.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
     public function render(int $indentLevel = 0): string
117 117
     {
118 118
         $lines = $this->lines;
119
-        array_walk($lines, function (&$line) use ($indentLevel) {
119
+        array_walk($lines, function(&$line) use ($indentLevel) {
120 120
             $line = $this->addIndent($line, $indentLevel);
121 121
         });
122 122
 
Please login to merge, or discard this patch.