@@ -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\Foundation\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 | } |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Foundation\Portals\Facade\PortButler; |
| 7 | -use DB; |
|
| 8 | 7 | use File; |
| 9 | 8 | |
| 10 | 9 | /** |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('failed_jobs', function (Blueprint $table) { |
|
| 16 | + Schema::create('failed_jobs', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->text('connection'); |
| 19 | 19 | $table->text('queue'); |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | /** |
| 114 | 114 | * @param \Symfony\Component\Finder\SplFileInfo $file |
| 115 | 115 | * |
| 116 | - * @return mixed |
|
| 116 | + * @return string |
|
| 117 | 117 | */ |
| 118 | 118 | private function getRouteFileNameWithoutExtension(SplFileInfo $file) |
| 119 | 119 | { |
@@ -7,7 +7,6 @@ |
||
| 7 | 7 | use Illuminate\Routing\Router as LaravelRouter; |
| 8 | 8 | use Illuminate\Support\Facades\Config; |
| 9 | 9 | use Illuminate\Support\Facades\File; |
| 10 | -use Route; |
|
| 11 | 10 | use Symfony\Component\Finder\SplFileInfo; |
| 12 | 11 | |
| 13 | 12 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $apiVersionNumber = $this->getRouteFileVersionNumber($file); |
| 55 | 55 | |
| 56 | 56 | $this->apiRouter->version('v' . $apiVersionNumber, |
| 57 | - function (DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 57 | + function(DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
| 58 | 58 | |
| 59 | 59 | $controllerNamespace = $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\UI\API\Controllers'; |
| 60 | 60 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | 'limit' => Config::get('hello.api.limit'), |
| 68 | 68 | // The API limit expiry time. |
| 69 | 69 | 'expires' => Config::get('hello.api.limit_expires'), |
| 70 | - ], function ($router) use ($file) { |
|
| 70 | + ], function($router) use ($file) { |
|
| 71 | 71 | |
| 72 | 72 | require $file->getPathname(); |
| 73 | 73 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $this->webRouter->group([ |
| 102 | 102 | 'middleware' => ['web'], |
| 103 | 103 | 'namespace' => $controllerNamespace, |
| 104 | - ], function (LaravelRouter $router) use ($file) { |
|
| 104 | + ], function(LaravelRouter $router) use ($file) { |
|
| 105 | 105 | require $file->getPathname(); |
| 106 | 106 | }); |
| 107 | 107 | } |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $newFactoriesPath = '/app/Port/Factory/Factories'; |
| 25 | 25 | |
| 26 | - App::singleton(Factory::class, function ($app) use ($newFactoriesPath) { |
|
| 26 | + App::singleton(Factory::class, function($app) use ($newFactoriesPath) { |
|
| 27 | 27 | $faker = $app->make(Generator::class); |
| 28 | 28 | |
| 29 | 29 | return Factory::construct($faker, base_path() . $newFactoriesPath); |
@@ -4,8 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Middleware\PortKernel; |
| 7 | -use DB; |
|
| 8 | -use File; |
|
| 9 | 7 | |
| 10 | 8 | /** |
| 11 | 9 | * Class MiddlewaresLoaderTrait. |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function runQueryDebugger($log = true, $terminal = false) |
| 26 | 26 | { |
| 27 | 27 | if (Config::get('database.query_debugging')) { |
| 28 | - DB::listen(function ($event) use ($terminal, $log) { |
|
| 28 | + DB::listen(function($event) use ($terminal, $log) { |
|
| 29 | 29 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
| 30 | 30 | |
| 31 | 31 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
| 36 | 36 | if ($serializerName !== 'DataArray') { |
| 37 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
| 37 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
| 38 | 38 | switch ($serializerName) { |
| 39 | 39 | case 'JsonApi': |
| 40 | 40 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -4,10 +4,7 @@ |
||
| 4 | 4 | |
| 5 | 5 | use App; |
| 6 | 6 | use App\Port\Exception\Exceptions\UnsupportedFractalSerializerException; |
| 7 | -use DB; |
|
| 8 | -use File; |
|
| 9 | 7 | use Illuminate\Support\Facades\Config; |
| 10 | -use Log; |
|
| 11 | 8 | |
| 12 | 9 | /** |
| 13 | 10 | * Class FractalTrait. |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | /* |
| 26 | 26 | * Authenticate the user's personal channel... |
| 27 | 27 | */ |
| 28 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
| 28 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
| 29 | 29 | return (int)$user->id === (int)$userId; |
| 30 | 30 | }); |
| 31 | 31 | } |