@@ -10,7 +10,7 @@ |
||
10 | 10 | * Create a new raw query expression. |
11 | 11 | * |
12 | 12 | * @param mixed $value |
13 | - * @return void |
|
13 | + * @return JsonExpression |
|
14 | 14 | */ |
15 | 15 | public function __construct($value) |
16 | 16 | { |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database; |
4 | 4 | |
5 | -use PDOException; |
|
6 | 5 | use Illuminate\Support\Str; |
6 | +use PDOException; |
|
7 | 7 | |
8 | 8 | class QueryException extends PDOException |
9 | 9 | { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | /** |
140 | 140 | * Get all of the commands matching the given names. |
141 | 141 | * |
142 | - * @param array $names |
|
142 | + * @param string[] $names |
|
143 | 143 | * @return \Illuminate\Support\Collection |
144 | 144 | */ |
145 | 145 | protected function commandsNamed(array $names) |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | /** |
328 | 328 | * Indicate that the given index should be dropped. |
329 | 329 | * |
330 | - * @param string|array $index |
|
330 | + * @param string $index |
|
331 | 331 | * @return \Illuminate\Support\Fluent |
332 | 332 | */ |
333 | 333 | public function dropIndex($index) |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | /** |
448 | 448 | * Specify the primary key(s) for the table. |
449 | 449 | * |
450 | - * @param string|array $columns |
|
450 | + * @param string[] $columns |
|
451 | 451 | * @param string $name |
452 | 452 | * @param string|null $algorithm |
453 | 453 | * @return \Illuminate\Support\Fluent |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | /** |
461 | 461 | * Specify a unique index for the table. |
462 | 462 | * |
463 | - * @param string|array $columns |
|
463 | + * @param string[] $columns |
|
464 | 464 | * @param string $name |
465 | 465 | * @param string|null $algorithm |
466 | 466 | * @return \Illuminate\Support\Fluent |
@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema; |
4 | 4 | |
5 | -use Closure; |
|
6 | 5 | use BadMethodCallException; |
7 | -use Illuminate\Support\Fluent; |
|
6 | +use Closure; |
|
8 | 7 | use Illuminate\Database\Connection; |
9 | -use Illuminate\Support\Traits\Macroable; |
|
10 | 8 | use Illuminate\Database\SQLiteConnection; |
11 | 9 | use Illuminate\Database\Schema\Grammars\Grammar; |
10 | +use Illuminate\Support\Fluent; |
|
11 | +use Illuminate\Support\Traits\Macroable; |
|
12 | 12 | |
13 | 13 | class Blueprint |
14 | 14 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | { |
71 | 71 | $this->table = $table; |
72 | 72 | |
73 | - if (! is_null($callback)) { |
|
73 | + if (!is_null($callback)) { |
|
74 | 74 | $callback($this); |
75 | 75 | } |
76 | 76 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $method = 'compile'.ucfirst($command->name); |
112 | 112 | |
113 | 113 | if (method_exists($grammar, $method)) { |
114 | - if (! is_null($sql = $grammar->$method($this, $command, $connection))) { |
|
114 | + if (!is_null($sql = $grammar->$method($this, $command, $connection))) { |
|
115 | 115 | $statements = array_merge($statements, (array) $sql); |
116 | 116 | } |
117 | 117 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | protected function commandsNamed(array $names) |
146 | 146 | { |
147 | - return collect($this->commands)->filter(function ($command) use ($names) { |
|
147 | + return collect($this->commands)->filter(function($command) use ($names) { |
|
148 | 148 | return in_array($command->name, $names); |
149 | 149 | }); |
150 | 150 | } |
@@ -157,11 +157,11 @@ discard block |
||
157 | 157 | */ |
158 | 158 | protected function addImpliedCommands(Grammar $grammar) |
159 | 159 | { |
160 | - if (count($this->getAddedColumns()) > 0 && ! $this->creating()) { |
|
160 | + if (count($this->getAddedColumns()) > 0 && !$this->creating()) { |
|
161 | 161 | array_unshift($this->commands, $this->createCommand('add')); |
162 | 162 | } |
163 | 163 | |
164 | - if (count($this->getChangedColumns()) > 0 && ! $this->creating()) { |
|
164 | + if (count($this->getChangedColumns()) > 0 && !$this->creating()) { |
|
165 | 165 | array_unshift($this->commands, $this->createCommand('change')); |
166 | 166 | } |
167 | 167 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | foreach ($grammar->getFluentCommands() as $commandName) { |
213 | 213 | $attributeName = lcfirst($commandName); |
214 | 214 | |
215 | - if (! isset($column->{$attributeName})) { |
|
215 | + if (!isset($column->{$attributeName})) { |
|
216 | 216 | continue; |
217 | 217 | } |
218 | 218 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | protected function creating() |
234 | 234 | { |
235 | - return collect($this->commands)->contains(function ($command) { |
|
235 | + return collect($this->commands)->contains(function($command){ |
|
236 | 236 | return $command->name == 'create'; |
237 | 237 | }); |
238 | 238 | } |
@@ -1262,7 +1262,7 @@ discard block |
||
1262 | 1262 | */ |
1263 | 1263 | public function removeColumn($name) |
1264 | 1264 | { |
1265 | - $this->columns = array_values(array_filter($this->columns, function ($c) use ($name) { |
|
1265 | + $this->columns = array_values(array_filter($this->columns, function($c) use ($name) { |
|
1266 | 1266 | return $c['attributes']['name'] != $name; |
1267 | 1267 | })); |
1268 | 1268 | |
@@ -1332,8 +1332,8 @@ discard block |
||
1332 | 1332 | */ |
1333 | 1333 | public function getAddedColumns() |
1334 | 1334 | { |
1335 | - return array_filter($this->columns, function ($column) { |
|
1336 | - return ! $column->change; |
|
1335 | + return array_filter($this->columns, function($column){ |
|
1336 | + return !$column->change; |
|
1337 | 1337 | }); |
1338 | 1338 | } |
1339 | 1339 | |
@@ -1344,7 +1344,7 @@ discard block |
||
1344 | 1344 | */ |
1345 | 1345 | public function getChangedColumns() |
1346 | 1346 | { |
1347 | - return array_filter($this->columns, function ($column) { |
|
1347 | + return array_filter($this->columns, function($column){ |
|
1348 | 1348 | return (bool) $column->change; |
1349 | 1349 | }); |
1350 | 1350 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | protected function commandsNamed(array $names) |
146 | 146 | { |
147 | - return collect($this->commands)->filter(function ($command) use ($names) { |
|
147 | + return collect($this->commands)->filter(function ($command) use ($names){ |
|
148 | 148 | return in_array($command->name, $names); |
149 | 149 | }); |
150 | 150 | } |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | protected function creating() |
234 | 234 | { |
235 | - return collect($this->commands)->contains(function ($command) { |
|
235 | + return collect($this->commands)->contains(function ($command){ |
|
236 | 236 | return $command->name == 'create'; |
237 | 237 | }); |
238 | 238 | } |
@@ -1262,7 +1262,7 @@ discard block |
||
1262 | 1262 | */ |
1263 | 1263 | public function removeColumn($name) |
1264 | 1264 | { |
1265 | - $this->columns = array_values(array_filter($this->columns, function ($c) use ($name) { |
|
1265 | + $this->columns = array_values(array_filter($this->columns, function ($c) use ($name){ |
|
1266 | 1266 | return $c['attributes']['name'] != $name; |
1267 | 1267 | })); |
1268 | 1268 | |
@@ -1332,7 +1332,7 @@ discard block |
||
1332 | 1332 | */ |
1333 | 1333 | public function getAddedColumns() |
1334 | 1334 | { |
1335 | - return array_filter($this->columns, function ($column) { |
|
1335 | + return array_filter($this->columns, function ($column){ |
|
1336 | 1336 | return ! $column->change; |
1337 | 1337 | }); |
1338 | 1338 | } |
@@ -1344,7 +1344,7 @@ discard block |
||
1344 | 1344 | */ |
1345 | 1345 | public function getChangedColumns() |
1346 | 1346 | { |
1347 | - return array_filter($this->columns, function ($column) { |
|
1347 | + return array_filter($this->columns, function ($column){ |
|
1348 | 1348 | return (bool) $column->change; |
1349 | 1349 | }); |
1350 | 1350 | } |
@@ -3,8 +3,8 @@ |
||
3 | 3 | namespace Illuminate\Database\Schema; |
4 | 4 | |
5 | 5 | use Closure; |
6 | -use LogicException; |
|
7 | 6 | use Illuminate\Database\Connection; |
7 | +use LogicException; |
|
8 | 8 | |
9 | 9 | class Builder |
10 | 10 | { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $tableColumns = array_map('strtolower', $this->getColumnListing($table)); |
101 | 101 | |
102 | 102 | foreach ($columns as $column) { |
103 | - if (! in_array(strtolower($column), $tableColumns)) { |
|
103 | + if (!in_array(strtolower($column), $tableColumns)) { |
|
104 | 104 | return false; |
105 | 105 | } |
106 | 106 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function create($table, Closure $callback) |
160 | 160 | { |
161 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback) { |
|
161 | + $this->build(tap($this->createBlueprint($table), function($blueprint) use ($callback) { |
|
162 | 162 | $blueprint->create(); |
163 | 163 | |
164 | 164 | $callback($blueprint); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function drop($table) |
175 | 175 | { |
176 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) { |
|
176 | + $this->build(tap($this->createBlueprint($table), function($blueprint){ |
|
177 | 177 | $blueprint->drop(); |
178 | 178 | })); |
179 | 179 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function dropIfExists($table) |
188 | 188 | { |
189 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) { |
|
189 | + $this->build(tap($this->createBlueprint($table), function($blueprint){ |
|
190 | 190 | $blueprint->dropIfExists(); |
191 | 191 | })); |
192 | 192 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public function rename($from, $to) |
226 | 226 | { |
227 | - $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to) { |
|
227 | + $this->build(tap($this->createBlueprint($from), function($blueprint) use ($to) { |
|
228 | 228 | $blueprint->rename($to); |
229 | 229 | })); |
230 | 230 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function create($table, Closure $callback) |
160 | 160 | { |
161 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback) { |
|
161 | + $this->build(tap($this->createBlueprint($table), function ($blueprint) use ($callback){ |
|
162 | 162 | $blueprint->create(); |
163 | 163 | |
164 | 164 | $callback($blueprint); |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function drop($table) |
175 | 175 | { |
176 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) { |
|
176 | + $this->build(tap($this->createBlueprint($table), function ($blueprint){ |
|
177 | 177 | $blueprint->drop(); |
178 | 178 | })); |
179 | 179 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | */ |
187 | 187 | public function dropIfExists($table) |
188 | 188 | { |
189 | - $this->build(tap($this->createBlueprint($table), function ($blueprint) { |
|
189 | + $this->build(tap($this->createBlueprint($table), function ($blueprint){ |
|
190 | 190 | $blueprint->dropIfExists(); |
191 | 191 | })); |
192 | 192 | } |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | */ |
225 | 225 | public function rename($from, $to) |
226 | 226 | { |
227 | - $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to) { |
|
227 | + $this->build(tap($this->createBlueprint($from), function ($blueprint) use ($to){ |
|
228 | 228 | $blueprint->rename($to); |
229 | 229 | })); |
230 | 230 | } |
@@ -2,14 +2,14 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema\Grammars; |
4 | 4 | |
5 | -use RuntimeException; |
|
6 | -use Doctrine\DBAL\Types\Type; |
|
7 | -use Illuminate\Support\Fluent; |
|
5 | +use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
6 | +use Doctrine\DBAL\Schema\Comparator; |
|
8 | 7 | use Doctrine\DBAL\Schema\Table; |
8 | +use Doctrine\DBAL\Types\Type; |
|
9 | 9 | use Illuminate\Database\Connection; |
10 | -use Doctrine\DBAL\Schema\Comparator; |
|
11 | 10 | use Illuminate\Database\Schema\Blueprint; |
12 | -use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
11 | +use Illuminate\Support\Fluent; |
|
12 | +use RuntimeException; |
|
13 | 13 | |
14 | 14 | class ChangeColumn |
15 | 15 | { |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public static function compile($grammar, Blueprint $blueprint, Fluent $command, Connection $connection) |
28 | 28 | { |
29 | - if (! $connection->isDoctrineAvailable()) { |
|
29 | + if (!$connection->isDoctrineAvailable()) { |
|
30 | 30 | throw new RuntimeException(sprintf( |
31 | 31 | 'Changing columns for table "%s" requires Doctrine DBAL; install "doctrine/dbal".', |
32 | 32 | $blueprint->getTable() |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | // Doctrine column definitions - which is necessary because Laravel and Doctrine |
80 | 80 | // use some different terminology for various column attributes on the tables. |
81 | 81 | foreach ($fluent->getAttributes() as $key => $value) { |
82 | - if (! is_null($option = static::mapFluentOptionToDoctrine($key))) { |
|
82 | + if (!is_null($option = static::mapFluentOptionToDoctrine($key))) { |
|
83 | 83 | if (method_exists($column, $method = 'set'.ucfirst($option))) { |
84 | 84 | $column->{$method}(static::mapFluentValueToDoctrine($option, $value)); |
85 | 85 | } |
@@ -200,6 +200,6 @@ discard block |
||
200 | 200 | */ |
201 | 201 | protected static function mapFluentValueToDoctrine($option, $value) |
202 | 202 | { |
203 | - return $option == 'notnull' ? ! $value : $value; |
|
203 | + return $option == 'notnull' ? !$value : $value; |
|
204 | 204 | } |
205 | 205 | } |
@@ -2,13 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema\Grammars; |
4 | 4 | |
5 | -use Illuminate\Support\Fluent; |
|
5 | +use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
6 | 6 | use Doctrine\DBAL\Schema\TableDiff; |
7 | 7 | use Illuminate\Database\Connection; |
8 | +use Illuminate\Database\Grammar as BaseGrammar; |
|
8 | 9 | use Illuminate\Database\Query\Expression; |
9 | 10 | use Illuminate\Database\Schema\Blueprint; |
10 | -use Illuminate\Database\Grammar as BaseGrammar; |
|
11 | -use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
11 | +use Illuminate\Support\Fluent; |
|
12 | 12 | |
13 | 13 | abstract class Grammar extends BaseGrammar |
14 | 14 | { |
@@ -83,11 +83,11 @@ discard block |
||
83 | 83 | // Once we have the basic foreign key creation statement constructed we can |
84 | 84 | // build out the syntax for what should happen on an update or delete of |
85 | 85 | // the affected columns, which will get something like "cascade", etc. |
86 | - if (! is_null($command->onDelete)) { |
|
86 | + if (!is_null($command->onDelete)) { |
|
87 | 87 | $sql .= " on delete {$command->onDelete}"; |
88 | 88 | } |
89 | 89 | |
90 | - if (! is_null($command->onUpdate)) { |
|
90 | + if (!is_null($command->onUpdate)) { |
|
91 | 91 | $sql .= " on update {$command->onUpdate}"; |
92 | 92 | } |
93 | 93 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | protected function getCommandsByName(Blueprint $blueprint, $name) |
173 | 173 | { |
174 | - return array_filter($blueprint->getCommands(), function ($value) use ($name) { |
|
174 | + return array_filter($blueprint->getCommands(), function($value) use ($name) { |
|
175 | 175 | return $value->name == $name; |
176 | 176 | }); |
177 | 177 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function prefixArray($prefix, array $values) |
187 | 187 | { |
188 | - return array_map(function ($value) use ($prefix) { |
|
188 | + return array_map(function($value) use ($prefix) { |
|
189 | 189 | return $prefix.' '.$value; |
190 | 190 | }, $values); |
191 | 191 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | { |
246 | 246 | $table = $this->getTablePrefix().$blueprint->getTable(); |
247 | 247 | |
248 | - return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) { |
|
248 | + return tap(new TableDiff($table), function($tableDiff) use ($schema, $table) { |
|
249 | 249 | $tableDiff->fromTable = $schema->listTableDetails($table); |
250 | 250 | }); |
251 | 251 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | protected function getCommandsByName(Blueprint $blueprint, $name) |
173 | 173 | { |
174 | - return array_filter($blueprint->getCommands(), function ($value) use ($name) { |
|
174 | + return array_filter($blueprint->getCommands(), function ($value) use ($name){ |
|
175 | 175 | return $value->name == $name; |
176 | 176 | }); |
177 | 177 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function prefixArray($prefix, array $values) |
187 | 187 | { |
188 | - return array_map(function ($value) use ($prefix) { |
|
188 | + return array_map(function ($value) use ($prefix){ |
|
189 | 189 | return $prefix.' '.$value; |
190 | 190 | }, $values); |
191 | 191 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | { |
246 | 246 | $table = $this->getTablePrefix().$blueprint->getTable(); |
247 | 247 | |
248 | - return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table) { |
|
248 | + return tap(new TableDiff($table), function ($tableDiff) use ($schema, $table){ |
|
249 | 249 | $tableDiff->fromTable = $schema->listTableDetails($table); |
250 | 250 | }); |
251 | 251 | } |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema\Grammars; |
4 | 4 | |
5 | -use Illuminate\Support\Fluent; |
|
6 | 5 | use Illuminate\Database\Connection; |
7 | 6 | use Illuminate\Database\Schema\Blueprint; |
7 | +use Illuminate\Support\Fluent; |
|
8 | 8 | |
9 | 9 | class MySqlGrammar extends Grammar |
10 | 10 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | // table is being created on. We will add these to the create table query. |
107 | 107 | if (isset($blueprint->charset)) { |
108 | 108 | $sql .= ' default character set '.$blueprint->charset; |
109 | - } elseif (! is_null($charset = $connection->getConfig('charset'))) { |
|
109 | + } elseif (!is_null($charset = $connection->getConfig('charset'))) { |
|
110 | 110 | $sql .= ' default character set '.$charset; |
111 | 111 | } |
112 | 112 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | // connection that the query is targeting. We'll add it to this SQL query. |
116 | 116 | if (isset($blueprint->collation)) { |
117 | 117 | $sql .= " collate '{$blueprint->collation}'"; |
118 | - } elseif (! is_null($collation = $connection->getConfig('collation'))) { |
|
118 | + } elseif (!is_null($collation = $connection->getConfig('collation'))) { |
|
119 | 119 | $sql .= " collate '{$collation}'"; |
120 | 120 | } |
121 | 121 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | { |
135 | 135 | if (isset($blueprint->engine)) { |
136 | 136 | return $sql.' engine = '.$blueprint->engine; |
137 | - } elseif (! is_null($engine = $connection->getConfig('engine'))) { |
|
137 | + } elseif (!is_null($engine = $connection->getConfig('engine'))) { |
|
138 | 138 | return $sql.' engine = '.$engine; |
139 | 139 | } |
140 | 140 | |
@@ -842,7 +842,7 @@ discard block |
||
842 | 842 | */ |
843 | 843 | protected function modifyVirtualAs(Blueprint $blueprint, Fluent $column) |
844 | 844 | { |
845 | - if (! is_null($column->virtualAs)) { |
|
845 | + if (!is_null($column->virtualAs)) { |
|
846 | 846 | return " as ({$column->virtualAs})"; |
847 | 847 | } |
848 | 848 | } |
@@ -856,7 +856,7 @@ discard block |
||
856 | 856 | */ |
857 | 857 | protected function modifyStoredAs(Blueprint $blueprint, Fluent $column) |
858 | 858 | { |
859 | - if (! is_null($column->storedAs)) { |
|
859 | + if (!is_null($column->storedAs)) { |
|
860 | 860 | return " as ({$column->storedAs}) stored"; |
861 | 861 | } |
862 | 862 | } |
@@ -884,7 +884,7 @@ discard block |
||
884 | 884 | */ |
885 | 885 | protected function modifyCharset(Blueprint $blueprint, Fluent $column) |
886 | 886 | { |
887 | - if (! is_null($column->charset)) { |
|
887 | + if (!is_null($column->charset)) { |
|
888 | 888 | return ' character set '.$column->charset; |
889 | 889 | } |
890 | 890 | } |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | */ |
899 | 899 | protected function modifyCollate(Blueprint $blueprint, Fluent $column) |
900 | 900 | { |
901 | - if (! is_null($column->collation)) { |
|
901 | + if (!is_null($column->collation)) { |
|
902 | 902 | return " collate '{$column->collation}'"; |
903 | 903 | } |
904 | 904 | } |
@@ -926,7 +926,7 @@ discard block |
||
926 | 926 | */ |
927 | 927 | protected function modifyDefault(Blueprint $blueprint, Fluent $column) |
928 | 928 | { |
929 | - if (! is_null($column->default)) { |
|
929 | + if (!is_null($column->default)) { |
|
930 | 930 | return ' default '.$this->getDefaultValue($column->default); |
931 | 931 | } |
932 | 932 | } |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | */ |
955 | 955 | protected function modifyFirst(Blueprint $blueprint, Fluent $column) |
956 | 956 | { |
957 | - if (! is_null($column->first)) { |
|
957 | + if (!is_null($column->first)) { |
|
958 | 958 | return ' first'; |
959 | 959 | } |
960 | 960 | } |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | */ |
969 | 969 | protected function modifyAfter(Blueprint $blueprint, Fluent $column) |
970 | 970 | { |
971 | - if (! is_null($column->after)) { |
|
971 | + if (!is_null($column->after)) { |
|
972 | 972 | return ' after '.$this->wrap($column->after); |
973 | 973 | } |
974 | 974 | } |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | */ |
983 | 983 | protected function modifyComment(Blueprint $blueprint, Fluent $column) |
984 | 984 | { |
985 | - if (! is_null($column->comment)) { |
|
985 | + if (!is_null($column->comment)) { |
|
986 | 986 | return " comment '".addslashes($column->comment)."'"; |
987 | 987 | } |
988 | 988 | } |
@@ -996,7 +996,7 @@ discard block |
||
996 | 996 | */ |
997 | 997 | protected function modifySrid(Blueprint $blueprint, Fluent $column) |
998 | 998 | { |
999 | - if (! is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { |
|
999 | + if (!is_null($column->srid) && is_int($column->srid) && $column->srid > 0) { |
|
1000 | 1000 | return ' srid '.$column->srid; |
1001 | 1001 | } |
1002 | 1002 | } |
@@ -2,9 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema\Grammars; |
4 | 4 | |
5 | -use RuntimeException; |
|
6 | -use Illuminate\Support\Fluent; |
|
7 | 5 | use Illuminate\Database\Schema\Blueprint; |
6 | +use Illuminate\Support\Fluent; |
|
7 | +use RuntimeException; |
|
8 | 8 | |
9 | 9 | class PostgresGrammar extends Grammar |
10 | 10 | { |
@@ -159,11 +159,11 @@ discard block |
||
159 | 159 | { |
160 | 160 | $sql = parent::compileForeign($blueprint, $command); |
161 | 161 | |
162 | - if (! is_null($command->deferrable)) { |
|
162 | + if (!is_null($command->deferrable)) { |
|
163 | 163 | $sql .= $command->deferrable ? ' deferrable' : ' not deferrable'; |
164 | 164 | } |
165 | 165 | |
166 | - if ($command->deferrable && ! is_null($command->initiallyImmediate)) { |
|
166 | + if ($command->deferrable && !is_null($command->initiallyImmediate)) { |
|
167 | 167 | $sql .= $command->initiallyImmediate ? ' initially immediate' : ' initially deferred'; |
168 | 168 | } |
169 | 169 | |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | */ |
842 | 842 | protected function modifyDefault(Blueprint $blueprint, Fluent $column) |
843 | 843 | { |
844 | - if (! is_null($column->default)) { |
|
844 | + if (!is_null($column->default)) { |
|
845 | 845 | return ' default '.$this->getDefaultValue($column->default); |
846 | 846 | } |
847 | 847 | } |
@@ -2,12 +2,12 @@ |
||
2 | 2 | |
3 | 3 | namespace Illuminate\Database\Schema\Grammars; |
4 | 4 | |
5 | -use Illuminate\Support\Fluent; |
|
5 | +use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
6 | 6 | use Doctrine\DBAL\Schema\Column; |
7 | 7 | use Doctrine\DBAL\Schema\TableDiff; |
8 | 8 | use Illuminate\Database\Connection; |
9 | 9 | use Illuminate\Database\Schema\Blueprint; |
10 | -use Doctrine\DBAL\Schema\AbstractSchemaManager as SchemaManager; |
|
10 | +use Illuminate\Support\Fluent; |
|
11 | 11 | |
12 | 12 | class RenameColumn |
13 | 13 | { |