@@ -40,6 +40,9 @@ |
||
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $directory |
|
| 45 | + */ |
|
| 43 | 46 | private function loadConfigs($directory) |
| 44 | 47 | { |
| 45 | 48 | if (File::isDirectory($directory)) { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Butler\Portals\Facade\PortButler; |
| 7 | -use DB; |
|
| 8 | 7 | use File; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Butler\Portals\Facade\PortButler; |
| 7 | -use DB; |
|
| 8 | 7 | use File; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | private function loadMigrations($directory) |
| 51 | 51 | { |
| 52 | - App::afterResolving('migrator', function ($migrator) use ($directory) { |
|
| 52 | + App::afterResolving('migrator', function($migrator) use ($directory) { |
|
| 53 | 53 | foreach ((array)$directory as $path) { |
| 54 | 54 | $migrator->path($path); |
| 55 | 55 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function debugDatabaseQueries($log = true, $terminal = false) |
| 30 | 30 | { |
| 31 | 31 | if (Config::get('database.query_debugging')) { |
| 32 | - DB::listen(function ($event) use ($terminal, $log) { |
|
| 32 | + DB::listen(function($event) use ($terminal, $log) { |
|
| 33 | 33 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
| 34 | 34 | |
| 35 | 35 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
| 54 | 54 | { |
| 55 | - App::singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
| 55 | + App::singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
| 56 | 56 | $faker = $app->make(\Faker\Generator::class); |
| 57 | 57 | |
| 58 | 58 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - return array_unique($allServiceProviders) ? : []; |
|
| 78 | + return array_unique($allServiceProviders) ?: []; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | |
| 153 | 153 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
| 154 | 154 | if ($serializerName !== 'DataArray') { |
| 155 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
| 155 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
| 156 | 156 | switch ($serializerName) { |
| 157 | 157 | case 'JsonApi': |
| 158 | 158 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | ->registerMiddlewareGroups($middlewareGroups); |
| 186 | 186 | |
| 187 | 187 | // Registering Route Middleware's |
| 188 | - foreach ($routeMiddlewares as $key => $routeMiddleware){ |
|
| 188 | + foreach ($routeMiddlewares as $key => $routeMiddleware) { |
|
| 189 | 189 | $this->app['router']->middleware($key, $routeMiddleware); |
| 190 | 190 | } |
| 191 | 191 | |