@@ -29,10 +29,10 @@ |
||
| 29 | 29 | $this->app['config']->get('database-config.cache_key'), |
| 30 | 30 | function () { |
| 31 | 31 | return DatabaseConfig::all() |
| 32 | - ->mapWithKeys(function ($config) { |
|
| 33 | - return [$config->name => $config->value]; |
|
| 34 | - }) |
|
| 35 | - ->all(); |
|
| 32 | + ->mapWithKeys(function ($config) { |
|
| 33 | + return [$config->name => $config->value]; |
|
| 34 | + }) |
|
| 35 | + ->all(); |
|
| 36 | 36 | } |
| 37 | 37 | ); |
| 38 | 38 | |
@@ -23,13 +23,13 @@ |
||
| 23 | 23 | $loadedFromCache = true; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - if (! isset($loadedFromCache)) { |
|
| 26 | + if (!isset($loadedFromCache)) { |
|
| 27 | 27 | // Load database config |
| 28 | 28 | $databaseConfig = $this->app['cache']->rememberForever( |
| 29 | 29 | $this->app['config']->get('database-config.cache_key'), |
| 30 | - function () { |
|
| 30 | + function() { |
|
| 31 | 31 | return DatabaseConfig::all() |
| 32 | - ->mapWithKeys(function ($config) { |
|
| 32 | + ->mapWithKeys(function($config) { |
|
| 33 | 33 | return [$config->name => $config->value]; |
| 34 | 34 | }) |
| 35 | 35 | ->all(); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create(config('database-config.table'), function (Blueprint $table) { |
|
| 16 | + Schema::create(config('database-config.table'), function(Blueprint $table) { |
|
| 17 | 17 | $table->string('name')->primary(); |
| 18 | 18 | $table->json('value')->nullable(); |
| 19 | 19 | $table->timestamps(); |
@@ -14,10 +14,10 @@ discard block |
||
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | 16 | $this->publishes([ |
| 17 | - __DIR__.'/../../config/database-config.php' => config_path('database-config.php'), |
|
| 17 | + __DIR__ . '/../../config/database-config.php' => config_path('database-config.php'), |
|
| 18 | 18 | ], 'config'); |
| 19 | 19 | |
| 20 | - $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); |
|
| 20 | + $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations'); |
|
| 21 | 21 | |
| 22 | 22 | if ($this->app->runningInConsole()) { |
| 23 | 23 | $this->commands([ |
@@ -34,6 +34,6 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function register() |
| 36 | 36 | { |
| 37 | - $this->mergeConfigFrom(__DIR__.'/../../config/database-config.php', 'database-config'); |
|
| 37 | + $this->mergeConfigFrom(__DIR__ . '/../../config/database-config.php', 'database-config'); |
|
| 38 | 38 | } |
| 39 | 39 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if (! function_exists('array_merge_recursive_distinct')) { |
|
| 3 | +if (!function_exists('array_merge_recursive_distinct')) { |
|
| 4 | 4 | /** |
| 5 | 5 | * Recursively merge two config arrays - retain distinct values and overwrite existing values. |
| 6 | 6 | * @see http://docs.php.net/manual/da/function.array-merge-recursive.php#92195 |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $config = DatabaseConfig::find($name); |
| 40 | 40 | |
| 41 | - if (! $config) { |
|
| 41 | + if (!$config) { |
|
| 42 | 42 | $attributes = []; |
| 43 | 43 | $newConfig = new DatabaseConfig; |
| 44 | 44 | $newConfig->name = $name; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $this->invalidateCache(); |
| 56 | - $this->info("Config for [{$name}.{$key}] with value [".implode(',', (array) $value).'] added successfully'); |
|
| 56 | + $this->info("Config for [{$name}.{$key}] with value [" . implode(',', (array)$value) . '] added successfully'); |
|
| 57 | 57 | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $key = $this->argument('key'); |
| 37 | 37 | $config = DatabaseConfig::find($name); |
| 38 | 38 | |
| 39 | - if (! $config) { |
|
| 39 | + if (!$config) { |
|
| 40 | 40 | $this->error("No configuration for [{$name}] found"); |
| 41 | 41 | |
| 42 | 42 | return 1; |