@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | public function register() |
38 | 38 | { |
39 | 39 | // Add database driver. |
40 | - $this->app->resolving('db', function ($db) { |
|
41 | - $db->extend('arangodb', function ($config, $name) { |
|
40 | + $this->app->resolving('db', function($db) { |
|
41 | + $db->extend('arangodb', function($config, $name) { |
|
42 | 42 | $config['name'] = $name; |
43 | 43 | $connection = new Connection($config); |
44 | 44 | $connection->setSchemaGrammar(new SchemaGrammar); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | }); |
48 | 48 | }); |
49 | 49 | |
50 | - $this->app->resolving(function ($app) { |
|
50 | + $this->app->resolving(function($app) { |
|
51 | 51 | if (class_exists('Illuminate\Foundation\AliasLoader')) { |
52 | 52 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
53 | 53 | $loader->alias('Eloquent', 'LaravelFreelancerNL\Aranguent\Eloquent\Model'); |
@@ -68,7 +68,7 @@ |
||
68 | 68 | // Here we will replace the table place-holders with the table specified by |
69 | 69 | // the developer, which is useful for quickly creating a tables creation |
70 | 70 | // or update migration from the console instead of typing it manually. |
71 | - if (! is_null($collection)) { |
|
71 | + if (!is_null($collection)) { |
|
72 | 72 | $stub = str_replace('DummyCollection', $collection, $stub); |
73 | 73 | } |
74 | 74 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function create($collection, Closure $callback, $config = []) |
58 | 58 | { |
59 | - $this->build(tap($this->createBlueprint($collection), function ($blueprint) use ($callback, $config) { |
|
59 | + $this->build(tap($this->createBlueprint($collection), function($blueprint) use ($callback, $config) { |
|
60 | 60 | $blueprint->create($config); |
61 | 61 | |
62 | 62 | $callback($blueprint); |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | protected function getAllCollections(array $options = []) |
172 | 172 | { |
173 | - if (! isset($options['excludeSystem'])) { |
|
173 | + if (!isset($options['excludeSystem'])) { |
|
174 | 174 | $options['excludeSystem'] = true; |
175 | 175 | } |
176 | 176 |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | $this->prefix = $prefix; |
105 | 105 | |
106 | - if (! is_null($callback)) { |
|
106 | + if (!is_null($callback)) { |
|
107 | 107 | $callback($this); |
108 | 108 | } |
109 | 109 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | */ |
245 | 245 | protected function creating() |
246 | 246 | { |
247 | - return collect($this->commands)->contains(function ($command) { |
|
247 | + return collect($this->commands)->contains(function($command) { |
|
248 | 248 | return $command->name === 'create'; |
249 | 249 | }); |
250 | 250 | } |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | 'double', 'enum', 'float', 'geometry', 'geometryCollection', 'increments', 'integer', 'ipAddress', 'json', |
575 | 575 | 'jsonb', 'lineString', 'longText', 'macAddress', 'mediumIncrements', 'mediumInteger', 'mediumText', |
576 | 576 | 'multiLineString', 'multiPoint', 'multiPolygon', 'nullableTimestamps', 'point', |
577 | - 'polygon', 'polygon', 'smallIncrements', 'smallInteger', 'string', 'text', 'time', |
|
577 | + 'polygon', 'polygon', 'smallIncrements', 'smallInteger', 'string', 'text', 'time', |
|
578 | 578 | 'timeTz', 'timestamp', 'timestampTz', 'tinyIncrements', 'tinyInteger', |
579 | 579 | 'unsignedBigInteger', 'unsignedDecimal', 'unsignedInteger', 'unsignedMediumInteger', 'unsignedSmallInteger', |
580 | 580 | 'unsignedTinyInteger', 'uuid', 'year', |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | { |
154 | 154 | $arangoConnection = $this->arangoConnection; |
155 | 155 | |
156 | - return $this->run($query, $bindings, function ($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
156 | + return $this->run($query, $bindings, function($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
157 | 157 | if ($this->pretending()) { |
158 | 158 | return []; |
159 | 159 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | { |
184 | 184 | $arangoConnection = $this->arangoConnection; |
185 | 185 | |
186 | - return $this->run($query, $bindings, function ($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
186 | + return $this->run($query, $bindings, function($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
187 | 187 | if ($this->pretending()) { |
188 | 188 | return true; |
189 | 189 | } |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | { |
217 | 217 | $arangoConnection = $this->arangoConnection; |
218 | 218 | |
219 | - return $this->run($query, $bindings, function ($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
219 | + return $this->run($query, $bindings, function($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
220 | 220 | if ($this->pretending()) { |
221 | 221 | return 0; |
222 | 222 | } |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | { |
253 | 253 | $arangoConnection = $this->arangoConnection; |
254 | 254 | |
255 | - return $this->run($query, [], function ($query) use ($arangoConnection) { |
|
255 | + return $this->run($query, [], function($query) use ($arangoConnection) { |
|
256 | 256 | if ($this->pretending()) { |
257 | 257 | return true; |
258 | 258 | } |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | { |
304 | 304 | $arangoConnection = $this->arangoConnection; |
305 | 305 | |
306 | - return $this->run($query, $bindings, function ($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
306 | + return $this->run($query, $bindings, function($query, $bindings) use ($arangoConnection, $transactionCollections) { |
|
307 | 307 | if ($this->pretending()) { |
308 | 308 | return []; |
309 | 309 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | protected function registerRepository() |
49 | 49 | { |
50 | - $this->app->singleton('migration.repository', function ($app) { |
|
50 | + $this->app->singleton('migration.repository', function($app) { |
|
51 | 51 | $collection = $app['config']['database.migrations']; |
52 | 52 | |
53 | 53 | return new DatabaseMigrationRepository($app['db'], $collection); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | // The migrator is responsible for actually running and rollback the migration |
63 | 63 | // files in the application. We'll pass in our database connection resolver |
64 | 64 | // so the migrator can resolve any of these connections when it needs to. |
65 | - $this->app->singleton('migrator', function ($app) { |
|
65 | + $this->app->singleton('migrator', function($app) { |
|
66 | 66 | $repository = $app['migration.repository']; |
67 | 67 | |
68 | 68 | return new Migrator($repository, $app['db'], $app['files']); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | protected function registerCreator() |
73 | 73 | { |
74 | - $this->app->singleton('migration.creator', function ($app) { |
|
74 | + $this->app->singleton('migration.creator', function($app) { |
|
75 | 75 | return new MigrationCreator($app['files']); |
76 | 76 | }); |
77 | 77 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | |
104 | 104 | protected function registerMigrateMakeCommand() |
105 | 105 | { |
106 | - $this->app->extend('command.migrate.make', function () { |
|
106 | + $this->app->extend('command.migrate.make', function() { |
|
107 | 107 | $creator = $this->app['migration.creator']; |
108 | 108 | $composer = $this->app->make('Illuminate\Support\Composer'); |
109 | 109 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | protected function registerAranguentConvertMigrationsCommand() |
115 | 115 | { |
116 | - $this->app->singleton('command.aranguent.convert-migrations', function ($app) { |
|
116 | + $this->app->singleton('command.aranguent.convert-migrations', function($app) { |
|
117 | 117 | return new AranguentConvertMigrationsCommand($app['migrator']); |
118 | 118 | }); |
119 | 119 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | $this->beginTransaction(); |
31 | 31 | |
32 | - return tap($callback($this), function () use ($options, $attempts) { |
|
32 | + return tap($callback($this), function() use ($options, $attempts) { |
|
33 | 33 | $this->commit($options, $attempts); |
34 | 34 | }); |
35 | 35 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | // $query = addslashes($query); |
82 | 82 | $jsCommand = 'db._query(aql`'.$query.'`'; |
83 | - if (! empty($bindings)) { |
|
83 | + if (!empty($bindings)) { |
|
84 | 84 | $bindings = json_encode($bindings); |
85 | 85 | $jsCommand .= ', '.$bindings; |
86 | 86 | } |
@@ -209,10 +209,10 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function commit($options = [], $attempts = 1) |
211 | 211 | { |
212 | - if (! $this->transactions > 0) { |
|
212 | + if (!$this->transactions > 0) { |
|
213 | 213 | throw new \Exception('Transaction committed before starting one.'); |
214 | 214 | } |
215 | - if (! isset($this->transactionCommands[$this->transactions]) || empty($this->transactionCommands[$this->transactions])) { |
|
215 | + if (!isset($this->transactionCommands[$this->transactions]) || empty($this->transactionCommands[$this->transactions])) { |
|
216 | 216 | throw new \Exception('Cannot commit an empty transaction.'); |
217 | 217 | } |
218 | 218 |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $name = Str::snake(trim($this->input->getArgument('name'))); |
49 | 49 | |
50 | 50 | $collection = $this->input->getOption('collection'); |
51 | - if (! $collection) { |
|
51 | + if (!$collection) { |
|
52 | 52 | $collection = $this->input->getOption('table'); |
53 | 53 | } |
54 | 54 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | // If no table was given as an option but a create option is given then we |
58 | 58 | // will use the "create" option as the table name. This allows the devs |
59 | 59 | // to pass a table name into this option as a short-cut for creating. |
60 | - if (! $collection && is_string($create)) { |
|
60 | + if (!$collection && is_string($create)) { |
|
61 | 61 | $collection = $create; |
62 | 62 | |
63 | 63 | $create = true; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | // Next, we will attempt to guess the table name if this the migration has |
67 | 67 | // "create" in the name. This will allow us to provide a convenient way |
68 | 68 | // of creating migrations that create new tables for the application. |
69 | - if (! $collection) { |
|
69 | + if (!$collection) { |
|
70 | 70 | [$collection, $create] = TableGuesser::guess($name); |
71 | 71 | } |
72 | 72 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | */ |
53 | 53 | public function handle() |
54 | 54 | { |
55 | - if (! $this->confirmToProceed()) { |
|
55 | + if (!$this->confirmToProceed()) { |
|
56 | 56 | return; |
57 | 57 | } |
58 | 58 |