@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | public function debugDatabaseQueries($log = true, $terminal = false) |
29 | 29 | { |
30 | 30 | if (Config::get('database.query_debugging')) { |
31 | - DB::listen(function ($event) use ($terminal, $log) { |
|
31 | + DB::listen(function($event) use ($terminal, $log) { |
|
32 | 32 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
33 | 33 | |
34 | 34 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
53 | 53 | { |
54 | - App::singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
54 | + App::singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
55 | 55 | $faker = $app->make(\Faker\Generator::class); |
56 | 56 | |
57 | 57 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
83 | 83 | } |
84 | 84 | |
85 | - return array_unique($allServiceProviders) ? : []; |
|
85 | + return array_unique($allServiceProviders) ?: []; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
119 | 119 | if ($serializerName !== 'DataArray') { |
120 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
120 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
121 | 121 | switch ($serializerName) { |
122 | 122 | case 'JsonApi': |
123 | 123 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -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)) { |
@@ -3,8 +3,6 @@ |
||
3 | 3 | namespace App\Port\Provider\Traits; |
4 | 4 | |
5 | 5 | use App; |
6 | -use DB; |
|
7 | -use Log; |
|
8 | 6 | |
9 | 7 | /** |
10 | 8 | * Class AutoRegisterServiceProvidersTrait. |