@@ -92,7 +92,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -275,7 +275,7 @@ |
||
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 |