@@ -9,7 +9,6 @@ |
||
| 9 | 9 | * |
| 10 | 10 | * @param string $name |
| 11 | 11 | * @param string $type |
| 12 | - * @param int $length |
|
| 13 | 12 | * @return bool |
| 14 | 13 | */ |
| 15 | 14 | public static function isType($name, $type); |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $result = $this->em->getConnection()->query($query->getQuery()); |
| 63 | 63 | $rawColumns = $result->fetchAll(PDO::FETCH_ASSOC); |
| 64 | 64 | if (count($rawColumns) === 0) { |
| 65 | - throw new Exception('Unknown table ' . $schemaTable); |
|
| 65 | + throw new Exception('Unknown table ' . $schemaTable); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $cols = []; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $rawColumns = $result->fetchAll(\PDO::FETCH_ASSOC); |
| 58 | 58 | |
| 59 | 59 | if (count($rawColumns) === 0) { |
| 60 | - throw new Exception('Unknown table ' . $table); |
|
| 60 | + throw new Exception('Unknown table ' . $table); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | $cols = []; |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | $type = substr($type, 0, $p); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | - $class = isset(static::$typeMapping[$type]) ? static::$typeMapping[$type] : Dbal\Type\Text::class; |
|
| 72 | + $class = isset(static::$typeMapping[$type]) ? static::$typeMapping[$type] : Dbal\Type\Text::class; |
|
| 73 | 73 | |
| 74 | 74 | $hasDefault = $rawColumn['dflt_value'] !== null; |
| 75 | 75 | |
| 76 | 76 | if (!$hasDefault && $rawColumn['type'] === 'integer' && $rawColumn['pk'] === '1') { |
| 77 | 77 | $multiplePrimaryKey = false; |
| 78 | 78 | if ($i < count($rawColumns) - 1) { |
| 79 | - for ($j = $i+1; $j < count($rawColumns); $j++) { |
|
| 79 | + for ($j = $i + 1; $j < count($rawColumns); $j++) { |
|
| 80 | 80 | if ($rawColumns[$j]['pk'] !== '0') { |
| 81 | 81 | $multiplePrimaryKey = true; |
| 82 | 82 | break; |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - $cols[] = new Column( |
|
| 91 | + $cols[] = new Column( |
|
| 92 | 92 | $rawColumn['name'], |
| 93 | 93 | new $class, |
| 94 | 94 | $hasDefault, |