@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | protected function registerRepository() |
| 58 | 58 | { |
| 59 | - $this->app->singleton('migration.repository', function ($app) { |
|
| 59 | + $this->app->singleton('migration.repository', function($app) { |
|
| 60 | 60 | $collection = $app['config']['database.migrations']; |
| 61 | 61 | |
| 62 | 62 | return new DatabaseMigrationRepository($app['db'], $collection); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | protected function registerCreator() |
| 67 | 67 | { |
| 68 | - $this->app->singleton('migration.creator', function ($app) { |
|
| 68 | + $this->app->singleton('migration.creator', function($app) { |
|
| 69 | 69 | return new MigrationCreator($app['files']); |
| 70 | 70 | }); |
| 71 | 71 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | */ |
| 78 | 78 | protected function registerMigrateMakeCommand() |
| 79 | 79 | { |
| 80 | - $this->app->singleton('command.migrate.make', function ($app) { |
|
| 80 | + $this->app->singleton('command.migrate.make', function($app) { |
|
| 81 | 81 | $creator = $app['migration.creator']; |
| 82 | 82 | |
| 83 | 83 | $composer = $app['composer']; |
@@ -88,14 +88,14 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | protected function registerAranguentConvertMigrationsCommand() |
| 90 | 90 | { |
| 91 | - $this->app->singleton('command.aranguent.convert-migrations', function ($app) { |
|
| 91 | + $this->app->singleton('command.aranguent.convert-migrations', function($app) { |
|
| 92 | 92 | return new AranguentConvertMigrationsCommand($app['migrator']); |
| 93 | 93 | }); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | protected function registerMakeModelCommand() |
| 97 | 97 | { |
| 98 | - $this->app->singleton('command.model.aranguent', function ($app) { |
|
| 98 | + $this->app->singleton('command.model.aranguent', function($app) { |
|
| 99 | 99 | return new ModelAranguentCommand($app['files']); |
| 100 | 100 | }); |
| 101 | 101 | } |
@@ -24,9 +24,9 @@ |
||
| 24 | 24 | protected function getStub() |
| 25 | 25 | { |
| 26 | 26 | if ($this->option('pivot')) { |
| 27 | - return __DIR__ . '/stubs/pivot.model.stub'; |
|
| 27 | + return __DIR__.'/stubs/pivot.model.stub'; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - return __DIR__ . '/stubs/model.stub'; |
|
| 30 | + return __DIR__.'/stubs/model.stub'; |
|
| 31 | 31 | } |
| 32 | 32 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | */ |
| 70 | 70 | public function create($collection, Closure $callback, $config = []) |
| 71 | 71 | { |
| 72 | - $this->build(tap($this->createBlueprint($collection), function ($blueprint) use ($callback, $config) { |
|
| 72 | + $this->build(tap($this->createBlueprint($collection), function($blueprint) use ($callback, $config) { |
|
| 73 | 73 | $blueprint->create($config); |
| 74 | 74 | |
| 75 | 75 | $callback($blueprint); |
@@ -88,6 +88,6 @@ |
||
| 88 | 88 | */ |
| 89 | 89 | public function stubPath() |
| 90 | 90 | { |
| 91 | - return __DIR__ . '/stubs'; |
|
| 91 | + return __DIR__.'/stubs'; |
|
| 92 | 92 | } |
| 93 | 93 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | if (Arr::isAssoc($values)) { |
| 37 | 37 | $values = [$values]; |
| 38 | 38 | } |
| 39 | - if (! Arr::isAssoc($values)) { |
|
| 39 | + if (!Arr::isAssoc($values)) { |
|
| 40 | 40 | // Here, we will sort the insert keys for every record so that each insert is |
| 41 | 41 | // in the same order for the record. We need to make sure this is the case |
| 42 | 42 | // so there are not any errors or problems when inserting these records. |
@@ -56,13 +56,13 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function qualifyColumn($column) |
| 58 | 58 | { |
| 59 | - $tableReferer = Str::singular($this->getTable()) . 'Doc'; |
|
| 59 | + $tableReferer = Str::singular($this->getTable()).'Doc'; |
|
| 60 | 60 | |
| 61 | - if (Str::startsWith($column, $tableReferer . '.')) { |
|
| 61 | + if (Str::startsWith($column, $tableReferer.'.')) { |
|
| 62 | 62 | return $column; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - return $tableReferer . '.' . $column; |
|
| 65 | + return $tableReferer.'.'.$column; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | $keyName = $this->getKeyName(); |
| 76 | 76 | |
| 77 | 77 | if ($keyName[0] != '_') { |
| 78 | - $keyName = '_' . $keyName; |
|
| 78 | + $keyName = '_'.$keyName; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - return Str::snake(class_basename($this)) . $keyName; |
|
| 81 | + return Str::snake(class_basename($this)).$keyName; |
|
| 82 | 82 | } |
| 83 | 83 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | // Usage of a separate DB to read date isn't supported at this time |
| 146 | 146 | $useReadPdo = null; |
| 147 | 147 | |
| 148 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
| 148 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
| 149 | 149 | if ($this->pretending()) { |
| 150 | 150 | return []; |
| 151 | 151 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $query = $query->query; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
| 181 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
| 182 | 182 | if ($this->pretending()) { |
| 183 | 183 | return true; |
| 184 | 184 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $query = $query->query; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - return $this->run($query, $bindings, function ($query, $bindings) use ($transactionCollections) { |
|
| 219 | + return $this->run($query, $bindings, function($query, $bindings) use ($transactionCollections) { |
|
| 220 | 220 | if ($this->pretending()) { |
| 221 | 221 | return 0; |
| 222 | 222 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | */ |
| 251 | 251 | public function unprepared($query) |
| 252 | 252 | { |
| 253 | - return $this->run($query, [], function ($query) { |
|
| 253 | + return $this->run($query, [], function($query) { |
|
| 254 | 254 | if ($this->pretending()) { |
| 255 | 255 | return true; |
| 256 | 256 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $query = $query->query; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - return $this->run($query, $bindings, function ($query, $bindings, $transactionCollections = null) { |
|
| 334 | + return $this->run($query, $bindings, function($query, $bindings, $transactionCollections = null) { |
|
| 335 | 335 | if ($this->pretending()) { |
| 336 | 336 | return []; |
| 337 | 337 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | protected function creating() |
| 32 | 32 | { |
| 33 | - return collect($this->commands)->contains(function ($command) { |
|
| 33 | + return collect($this->commands)->contains(function($command) { |
|
| 34 | 34 | return $command->name === 'create'; |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function executeCreateCommand($command) |
| 39 | 39 | { |
| 40 | 40 | if ($this->connection->pretending()) { |
| 41 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
| 41 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
| 42 | 42 | |
| 43 | 43 | return; |
| 44 | 44 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | public function executeIndexCommand($command) |
| 163 | 163 | { |
| 164 | 164 | if ($this->connection->pretending()) { |
| 165 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
| 165 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
| 166 | 166 | |
| 167 | 167 | return; |
| 168 | 168 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $parameters = []; |
| 194 | 194 | $parameters['name'] = 'dropIndex'; |
| 195 | 195 | $parameters['index'] = $name; |
| 196 | - $parameters['explanation'] = "Drop the '" . $name . "' index on the {$this->table} table."; |
|
| 196 | + $parameters['explanation'] = "Drop the '".$name."' index on the {$this->table} table."; |
|
| 197 | 197 | $parameters['handler'] = 'collection'; |
| 198 | 198 | |
| 199 | 199 | return $this->addCommand('dropIndex', $parameters); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | public function executeDropIndexCommand($command) |
| 209 | 209 | { |
| 210 | 210 | if ($this->connection->pretending()) { |
| 211 | - $this->connection->logQuery('/* ' . $command->explanation . " */\n", []); |
|
| 211 | + $this->connection->logQuery('/* '.$command->explanation." */\n", []); |
|
| 212 | 212 | |
| 213 | 213 | return; |
| 214 | 214 | } |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | public function createIndexName($type, array $columns, array $options = []) |
| 246 | 246 | { |
| 247 | 247 | $nameParts = []; |
| 248 | - $nameParts[] = $this->prefix . $this->table; |
|
| 248 | + $nameParts[] = $this->prefix.$this->table; |
|
| 249 | 249 | $nameParts = array_merge($nameParts, $columns); |
| 250 | 250 | $nameParts[] = $type; |
| 251 | 251 | $nameParts = array_merge($nameParts, array_keys($options)); |