Completed
Branch master (c182fa)
by Anton
04:20
created
Category
source/Spiral/ORM/Columns/EnumColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Set of allowed enum values.
27 27
      */
28
-    const VALUES  = [];
28
+    const VALUES = [];
29 29
 
30 30
     /**
31 31
      * Default value.
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
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 
62 62
             $schemas[] = $this->container->get(FactoryInterface::class)->make(
63 63
                 RecordSchema::class,
64
-                ['reflection' => new ReflectionEntity($class['name']),]
64
+                ['reflection' => new ReflectionEntity($class['name']), ]
65 65
             );
66 66
         }
67 67
 
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/Entities/Relations/BelongsToRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 
81 81
         if (!$this->isSynced($this->parent, $this->instance)) {
82 82
             //Syncing FKs before primary command been executed
83
-            $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) {
83
+            $innerCommand->onExecute(function($innerCommand) use ($parentCommand) {
84 84
                 $parentCommand->addContext(
85 85
                     $this->key(Record::INNER_KEY),
86 86
                     $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand)
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/HasOneRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         //Inversed version of BelongsTo
90 90
         if (!$this->isSynced($this->parent, $this->instance)) {
91 91
             //Syncing FKs after primary command been executed
92
-            $parentCommand->onExecute(function ($outerCommand) use ($innerCommand) {
92
+            $parentCommand->onExecute(function($outerCommand) use ($innerCommand) {
93 93
                 $innerCommand->addContext(
94 94
                     $this->key(Record::OUTER_KEY),
95 95
                     $this->lookupKey(Record::INNER_KEY, $this->parent, $outerCommand)
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/HasManyRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@
 block discarded – undo
200 200
 
201 201
         if (!$this->isSynced($this->parent, $instance)) {
202 202
             //Delayed linking
203
-            $parentCommand->onExecute(function ($outerCommand) use ($innerCommand) {
203
+            $parentCommand->onExecute(function($outerCommand) use ($innerCommand) {
204 204
                 $innerCommand->addContext(
205 205
                     $this->key(Record::OUTER_KEY),
206 206
                     $this->lookupKey(Record::INNER_KEY, $this->parent, $outerCommand)
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/BelongsToMorphedRelation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 
105 105
         if (!$this->isSynced($this->parent, $this->instance)) {
106 106
             //Syncing FKs before primary command been executed
107
-            $innerCommand->onExecute(function ($innerCommand) use ($parentCommand) {
107
+            $innerCommand->onExecute(function($innerCommand) use ($parentCommand) {
108 108
                 $parentCommand->addContext(
109 109
                     $this->key(Record::INNER_KEY),
110 110
                     $this->lookupKey(Record::OUTER_KEY, $this->parent, $innerCommand)
Please login to merge, or discard this patch.
source/Spiral/ORM/Entities/Relations/ManyToManyRelation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             }
296 296
 
297 297
             //Syncing pivot data values
298
-            $command->onComplete(function (ContextualCommandInterface $command) use ($record) {
298
+            $command->onComplete(function(ContextualCommandInterface $command) use ($record) {
299 299
                 //Now when we are done we can sync our values with current data
300 300
                 $this->pivotData->offsetSet(
301 301
                     $record,
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         ContextualCommandInterface $outerCommand
343 343
     ) {
344 344
         //Parent record dependency
345
-        $parentCommand->onExecute(function ($parentCommand) use ($pivotCommand, $parent) {
345
+        $parentCommand->onExecute(function($parentCommand) use ($pivotCommand, $parent) {
346 346
             $pivotCommand->addContext(
347 347
                 $this->key(Record::THOUGHT_INNER_KEY),
348 348
                 $this->lookupKey(Record::INNER_KEY, $parent, $parentCommand)
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         });
351 351
 
352 352
         //Outer record dependency
353
-        $outerCommand->onExecute(function ($outerCommand) use ($pivotCommand, $outer) {
353
+        $outerCommand->onExecute(function($outerCommand) use ($pivotCommand, $outer) {
354 354
             $pivotCommand->addContext(
355 355
                 $this->key(Record::THOUGHT_OUTER_KEY),
356 356
                 $this->lookupKey(Record::OUTER_KEY, $outer, $outerCommand)
Please login to merge, or discard this patch.