@@ -70,17 +70,17 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | public function register(): void |
| 72 | 72 | { |
| 73 | - $this->app->bind(Configuration::class, function (ContainerInterface $app) { |
|
| 73 | + $this->app->bind(Configuration::class, function(ContainerInterface $app) { |
|
| 74 | 74 | /** @template T @var Config<T> $config */ |
| 75 | 75 | $config = $app->get(Config::class); |
| 76 | 76 | $driver = $config->get('database.default', 'default'); |
| 77 | 77 | |
| 78 | 78 | return new Configuration($config->get('database.connections.' . $driver, [])); |
| 79 | 79 | }); |
| 80 | - $this->app->share(Pool::class, function (ContainerInterface $app) { |
|
| 80 | + $this->app->share(Pool::class, function(ContainerInterface $app) { |
|
| 81 | 81 | return new Pool($app->get(Config::class)->get('database', [])); |
| 82 | 82 | }); |
| 83 | - $this->app->share(Connection::class, function (ContainerInterface $app) { |
|
| 83 | + $this->app->share(Connection::class, function(ContainerInterface $app) { |
|
| 84 | 84 | return new Connection( |
| 85 | 85 | $app->get(Configuration::class), |
| 86 | 86 | $app->get(LoggerInterface::class) |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | protected function parse(string $env): array |
| 131 | 131 | { |
| 132 | - $environments = array_filter((array)preg_split('/(\/|\.)/', $env)); |
|
| 132 | + $environments = array_filter((array) preg_split('/(\/|\.)/', $env)); |
|
| 133 | 133 | array_unshift($environments, ''); |
| 134 | 134 | |
| 135 | 135 | return $environments; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | { |
| 184 | 184 | $results = $this->queryBuilder |
| 185 | 185 | ->from($this->table) |
| 186 | - ->where('id')->in(function (SubQuery $q) use ($env, $group) { |
|
| 186 | + ->where('id')->in(function(SubQuery $q) use ($env, $group) { |
|
| 187 | 187 | $query = $q->from($this->table) |
| 188 | 188 | ->where('module')->is($group) |
| 189 | 189 | ->where('status')->is(1) |
@@ -194,8 +194,8 @@ discard block |
||
| 194 | 194 | $query->where('env')->is($env); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | - $query->select(function (ColumnExpression $cexp) { |
|
| 198 | - $cexp->column(function (Expression $exp) { |
|
| 197 | + $query->select(function(ColumnExpression $cexp) { |
|
| 198 | + $cexp->column(function(Expression $exp) { |
|
| 199 | 199 | $exp->op('COALESCE'); |
| 200 | 200 | }); |
| 201 | 201 | }); |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | protected function createMigrationTable(): void |
| 118 | 118 | { |
| 119 | 119 | $tableName = $this->table; |
| 120 | - $this->schema->create($tableName, function (CreateTable $table) { |
|
| 120 | + $this->schema->create($tableName, function(CreateTable $table) { |
|
| 121 | 121 | $table->string('version', 20) |
| 122 | 122 | ->description('The migration version') |
| 123 | 123 | ->primary(); |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | $this->setName('migration:exec') |
| 75 | 75 | ->setDescription('Execute the migration up/down for one version'); |
| 76 | 76 | |
| 77 | - $this->addArgument('type', 'type of migration [up|down]', 'up', true, true, false, function ($val) { |
|
| 77 | + $this->addArgument('type', 'type of migration [up|down]', 'up', true, true, false, function($val) { |
|
| 78 | 78 | if (!in_array($val, ['up', 'down'])) { |
| 79 | 79 | throw new RuntimeException(sprintf( |
| 80 | 80 | 'Invalid argument type [%s], must be one of [up, down]', |