@@ -46,7 +46,7 @@ |
||
46 | 46 | switch ($platform->name()) { |
47 | 47 | case 'mysql': |
48 | 48 | $connection->executeUpdate('UPDATE '.$metadata->sequence['table'] |
49 | - .' SET '. $metadata->sequence['column'].' = LAST_INSERT_ID('.$metadata->sequence['column'].'+1)'); |
|
49 | + .' SET '.$metadata->sequence['column'].' = LAST_INSERT_ID('.$metadata->sequence['column'].'+1)'); |
|
50 | 50 | return $connection->lastInsertId(); |
51 | 51 | |
52 | 52 | case 'sqlite': |
@@ -172,21 +172,21 @@ |
||
172 | 172 | if ($default !== null) { |
173 | 173 | switch ($type) { |
174 | 174 | case TypeInterface::BOOLEAN: |
175 | - $default = (boolean)$default; |
|
175 | + $default = (boolean) $default; |
|
176 | 176 | break; |
177 | 177 | |
178 | 178 | case TypeInterface::TINYINT: |
179 | 179 | case TypeInterface::SMALLINT: |
180 | 180 | case TypeInterface::INTEGER: |
181 | - $default = (int)$default; |
|
181 | + $default = (int) $default; |
|
182 | 182 | break; |
183 | 183 | |
184 | 184 | case TypeInterface::FLOAT: |
185 | - $default = (float)$default; |
|
185 | + $default = (float) $default; |
|
186 | 186 | break; |
187 | 187 | |
188 | 188 | case TypeInterface::DOUBLE: |
189 | - $default = (double)$default; |
|
189 | + $default = (double) $default; |
|
190 | 190 | break; |
191 | 191 | } |
192 | 192 |
@@ -40,10 +40,10 @@ |
||
40 | 40 | */ |
41 | 41 | public function acceptSchema(Schema $schema) |
42 | 42 | { |
43 | - $this->output = 'digraph "' . sha1(mt_rand()) . '" {' . "\n"; |
|
44 | - $this->output .= 'graph [fontname="helvetica", fontsize=12];' . "\n"; |
|
45 | - $this->output .= 'node [fontname="helvetica", fontsize=12];' . "\n"; |
|
46 | - $this->output .= 'edge [fontname="helvetica", fontsize=12];' . "\n"; |
|
43 | + $this->output = 'digraph "'.sha1(mt_rand()).'" {'."\n"; |
|
44 | + $this->output .= 'graph [fontname="helvetica", fontsize=12];'."\n"; |
|
45 | + $this->output .= 'node [fontname="helvetica", fontsize=12];'."\n"; |
|
46 | + $this->output .= 'edge [fontname="helvetica", fontsize=12];'."\n"; |
|
47 | 47 | // $this->output .= 'splines = true;' . "\n"; |
48 | 48 | // $this->output .= 'overlap = false;' . "\n"; |
49 | 49 | // $this->output .= 'outputorder=edgesfirst;'."\n"; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public static function generate($prefix, array $parts, $length = self::DEFAULT_LENGTH) |
22 | 22 | { |
23 | - $hash = implode('', array_map(function ($part) { |
|
23 | + $hash = implode('', array_map(function($part) { |
|
24 | 24 | return dechex(crc32($part)); |
25 | 25 | }, $parts)); |
26 | 26 |
@@ -53,11 +53,11 @@ |
||
53 | 53 | |
54 | 54 | return new Table( |
55 | 55 | $this->table->name(), |
56 | - array_map(function (ColumnInterface $column) { |
|
56 | + array_map(function(ColumnInterface $column) { |
|
57 | 57 | return (new ColumnTransformer($column, $this->platform)) |
58 | 58 | ->toDoctrine(); |
59 | 59 | }, $this->table->columns()), |
60 | - array_map(function (IndexInterface $index) { |
|
60 | + array_map(function(IndexInterface $index) { |
|
61 | 61 | return (new IndexTransformer($index)) |
62 | 62 | ->toDoctrine(); |
63 | 63 | }, $this->table->indexes()->all()), |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function setListDropColumn($flag) |
30 | 30 | { |
31 | - $this->listDropColumn = (bool)$flag; |
|
31 | + $this->listDropColumn = (bool) $flag; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function all() |
44 | 44 | { |
45 | - $indexes = $this->extractIndexes($this->metadata->indexes); |
|
45 | + $indexes = $this->extractIndexes($this->metadata->indexes); |
|
46 | 46 | |
47 | 47 | $primary = $this->primary(); |
48 | 48 | $indexes[$primary->name()] = $primary; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function columns() |
50 | 50 | { |
51 | - return array_map(function ($meta) { |
|
51 | + return array_map(function($meta) { |
|
52 | 52 | return $this->column($meta['field']); |
53 | 53 | }, $this->metadata->fields); |
54 | 54 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | { |
89 | 89 | return new IndexSet( |
90 | 90 | array_map( |
91 | - function ($index) { |
|
91 | + function($index) { |
|
92 | 92 | return new DoctrineIndex($index); |
93 | 93 | }, |
94 | 94 | $this->table->getIndexes() |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | { |
104 | 104 | return new ConstraintSet( |
105 | 105 | array_map( |
106 | - function ($fk) { |
|
106 | + function($fk) { |
|
107 | 107 | return new DoctrineForeignKey($fk); |
108 | 108 | }, |
109 | 109 | $this->table->getForeignKeys() |