Passed
Push — master ( 7c65f5...b2dab0 )
by Alban
20:35
created
src/SaveRelationsBehavior.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
         );
561 561
 
562 562
         // Deleted relations
563
-        $initialModels = ArrayHelper::index($this->_oldRelationValue[$relationName], function (BaseActiveRecord $model) {
563
+        $initialModels = ArrayHelper::index($this->_oldRelationValue[$relationName], function(BaseActiveRecord $model) {
564 564
             return implode('-', $model->getPrimaryKey(true));
565 565
         });
566 566
         $initialRelations = $owner->{$relationName};
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         // Added relations
572 572
         $actualModels = ArrayHelper::index(
573 573
             $junctionTablePropertiesUsed ? $initialRelations : $owner->{$relationName},
574
-            function (BaseActiveRecord $model) {
574
+            function(BaseActiveRecord $model) {
575 575
                 return implode('-', $model->getPrimaryKey(true));
576 576
             }
577 577
         );
@@ -618,10 +618,10 @@  discard block
 block discarded – undo
618 618
     private function _computePkDiff($initialRelations, $updatedRelations, $forceSave = false)
619 619
     {
620 620
         // Compute differences between initial relations and the current ones
621
-        $oldPks = ArrayHelper::getColumn($initialRelations, function (BaseActiveRecord $model) {
621
+        $oldPks = ArrayHelper::getColumn($initialRelations, function(BaseActiveRecord $model) {
622 622
             return implode('-', $model->getPrimaryKey(true));
623 623
         });
624
-        $newPks = ArrayHelper::getColumn($updatedRelations, function (BaseActiveRecord $model) {
624
+        $newPks = ArrayHelper::getColumn($updatedRelations, function(BaseActiveRecord $model) {
625 625
             return implode('-', $model->getPrimaryKey(true));
626 626
         });
627 627
         if ($forceSave) {
Please login to merge, or discard this patch.