@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public static function findPK($table) |
| 18 | 18 | { |
| 19 | - if (! $table) { |
|
| 19 | + if (!$table) { |
|
| 20 | 20 | return 'id'; |
| 21 | 21 | } |
| 22 | 22 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $primaryKey = self::findPKname($table); |
| 29 | 29 | |
| 30 | - if (! $primaryKey) { |
|
| 30 | + if (!$primaryKey) { |
|
| 31 | 31 | return 'id'; |
| 32 | 32 | } |
| 33 | 33 | CbCache::put('table_'.$table, 'primaryKey', $primaryKey); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | private static function findPKname($table) |
| 43 | 43 | { |
| 44 | 44 | $cols = \DB::getDoctrineSchemaManager()->listTableDetails($table)->getPrimaryKey()->getColumns(); |
| 45 | - if (! empty($cols)) { |
|
| 45 | + if (!empty($cols)) { |
|
| 46 | 46 | return $cols[0]; |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -55,11 +55,11 @@ discard block |
||
| 55 | 55 | public static function isNullableColumn($table, $colName) |
| 56 | 56 | { |
| 57 | 57 | $colObj = \DB::getDoctrineSchemaManager()->listTableColumns($table)[$colName]; |
| 58 | - if (! $colObj) { |
|
| 58 | + if (!$colObj) { |
|
| 59 | 59 | return; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - return ! $colObj->getNotnull(); |
|
| 62 | + return !$colObj->getNotnull(); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | $table = self::getTableForeignKey($fieldName); |
| 97 | - if (! $table) { |
|
| 97 | + if (!$table) { |
|
| 98 | 98 | return false; |
| 99 | 99 | } |
| 100 | 100 | |