Test Setup Failed
Branch master (12ff87)
by Aleksandr
01:06
created
Category
traits/MigrationTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 break;
93 93
             case "smallint":
94 94
                 if ($size === 1) {
95
-                    $default = (boolean)$default;
95
+                    $default = (boolean) $default;
96 96
                     $builder = $this->boolean();
97 97
                 } else {
98 98
                     $builder = $this->smallInteger($size);
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 $column = is_numeric($column) ? $type->name : $column;
160 160
                 $type = $this->columnSchemaToBuilder($type);
161 161
             }
162
-            if ((string)$type == (string)$this->primaryKey()) {
162
+            if ((string) $type == (string) $this->primaryKey()) {
163 163
                 $pks[] = $column;
164 164
             }
165 165
             if ($type instanceof ForeignKeyColumn) {
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
     public static function formIndexName($table, $columns, $suffix = "idx")
462 462
     {
463 463
         $table = self::removeSchema($table);
464
-        $column = join(':', array_map('trim', (array)$columns));
464
+        $column = join(':', array_map('trim', (array) $columns));
465 465
         return "{$table}:{$column}_$suffix";
466 466
     }
467 467
 
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
             $this->insert($table, $row);
476 476
         }
477 477
         if ($updateSeq) {
478
-            $c = (int)\Yii::$app->db->createCommand("SELECT count(*) FROM {{$table}}")->queryScalar() + 1;
478
+            $c = (int) \Yii::$app->db->createCommand("SELECT count(*) FROM {{$table}}")->queryScalar() + 1;
479 479
             $this->execute("ALTER SEQUENCE {$table}_{$updateSeq}_seq RESTART WITH $c;");
480 480
         }
481 481
     }
Please login to merge, or discard this patch.
traits/PivotTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -275,7 +275,7 @@
 block discarded – undo
275 275
     {
276 276
         $pks = self::getDb()->getTableSchema($pivotClass::tableName())->primaryKey;
277 277
         $fks = self::formFkKeys(self::getDb()->getTableSchema($pivotClass::tableName())->foreignKeys);
278
-        $fks = array_values(array_filter($fks, function ($data) use ($pks) {
278
+        $fks = array_values(array_filter($fks, function($data) use ($pks) {
279 279
             return in_array($data['field'], $pks);
280 280
         }));
281 281
 
Please login to merge, or discard this patch.