@@ -40,7 +40,7 @@ |
||
40 | 40 | /** |
41 | 41 | * Exception constructor. |
42 | 42 | * |
43 | - * @param null $message |
|
43 | + * @param string $message |
|
44 | 44 | * @param null $errors |
45 | 45 | * @param null $statusCode |
46 | 46 | * @param int $code |
@@ -47,6 +47,7 @@ |
||
47 | 47 | * By default Laravel takes (server/database/factories) as the |
48 | 48 | * path to the factories, this function changes the path to load |
49 | 49 | * the factories from the infrastructure directory. |
50 | + * @param string $customPath |
|
50 | 51 | */ |
51 | 52 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
52 | 53 | { |
@@ -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); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
73 | 73 | } |
74 | 74 | |
75 | - return array_unique($allServiceProviders) ? : []; |
|
75 | + return array_unique($allServiceProviders) ?: []; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | if (File::isDirectory($containerMigrationDirectory)) { |
103 | 103 | |
104 | - App::afterResolving('migrator', function ($migrator) use ($containerMigrationDirectory) { |
|
104 | + App::afterResolving('migrator', function($migrator) use ($containerMigrationDirectory) { |
|
105 | 105 | foreach ((array)$containerMigrationDirectory as $path) { |
106 | 106 | $migrator->path($path); |
107 | 107 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
130 | 130 | if ($serializerName !== 'DataArray') { |
131 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
131 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
132 | 132 | switch ($serializerName) { |
133 | 133 | case 'JsonApi': |
134 | 134 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $apiVersionNumber = $this->getRouteFileVersionNumber($fileNameWithoutExtension); |
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 | $router->group([ |
60 | 60 | // Routes Namespace |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | 'limit' => Config::get('api.limit'), |
66 | 66 | // The API limit expiry time. |
67 | 67 | 'expires' => Config::get('api.limit_expires'), |
68 | - ], function ($router) use ($file) { |
|
68 | + ], function($router) use ($file) { |
|
69 | 69 | |
70 | 70 | require $file->getPathname(); |
71 | 71 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | foreach ($files as $file) { |
97 | 97 | $this->webRouter->group([ |
98 | 98 | 'namespace' => $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\Controllers', |
99 | - ], function (LaravelRouter $router) use ($file) { |
|
99 | + ], function(LaravelRouter $router) use ($file) { |
|
100 | 100 | require $file->getPathname(); |
101 | 101 | }); |
102 | 102 | } |
@@ -28,6 +28,6 @@ |
||
28 | 28 | */ |
29 | 29 | public function handle() |
30 | 30 | { |
31 | - $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL); |
|
31 | + $this->comment(PHP_EOL . Inspiring::quote() . PHP_EOL); |
|
32 | 32 | } |
33 | 33 | } |
@@ -32,6 +32,6 @@ |
||
32 | 32 | protected function schedule(Schedule $schedule) |
33 | 33 | { |
34 | 34 | $schedule->command('inspire') |
35 | - ->hourly(); |
|
35 | + ->hourly(); |
|
36 | 36 | } |
37 | 37 | } |
@@ -3,6 +3,6 @@ |
||
3 | 3 | // Default root route |
4 | 4 | use Illuminate\Support\Facades\Config; |
5 | 5 | |
6 | -$router->any('/', function () { |
|
6 | +$router->any('/', function() { |
|
7 | 7 | return response()->json(['Welcome to ' . Config::get('api.name') . '.']); |
8 | 8 | }); |
@@ -37,6 +37,6 @@ |
||
37 | 37 | */ |
38 | 38 | public function apply($model, PrettusRepositoryInterface $repository) |
39 | 39 | { |
40 | - return DB::table($model->getModel()->getTable())->select('*', DB::raw('count('.$this->field.') as total_count'))->groupBy($this->field); |
|
40 | + return DB::table($model->getModel()->getTable())->select('*', DB::raw('count(' . $this->field . ') as total_count'))->groupBy($this->field); |
|
41 | 41 | } |
42 | 42 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function up() |
20 | 20 | { |
21 | - Schema::create('paypal_accounts', function (Blueprint $table) { |
|
21 | + Schema::create('paypal_accounts', function(Blueprint $table) { |
|
22 | 22 | $table->increments('id'); |
23 | 23 | |
24 | 24 | $table->string('some_id'); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function up() |
20 | 20 | { |
21 | - Schema::create('stripe_accounts', function (Blueprint $table) { |
|
21 | + Schema::create('stripe_accounts', function(Blueprint $table) { |
|
22 | 22 | $table->increments('id'); |
23 | 23 | $table->string('customer_id'); |
24 | 24 | $table->string('card_id')->nullable(); |