@@ -37,7 +37,6 @@ |
||
37 | 37 | /** |
38 | 38 | * MailsAbstract constructor. |
39 | 39 | * |
40 | - * @param \Illuminate\Mail\Mailer $mail |
|
41 | 40 | */ |
42 | 41 | public function __construct() |
43 | 42 | { |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | // check if sending emails is enabled and if this is not running a testing environment |
59 | 59 | if (Config::get('mail.enabled')) { |
60 | - Mail::queue('EmailTemplates.' . $this->template, $data, function ($message) { |
|
60 | + Mail::queue('EmailTemplates.' . $this->template, $data, function($message) { |
|
61 | 61 | $message->from($this->fromEmail, $this->fromName); |
62 | 62 | $message->to($this->toEmail, $this->toName) |
63 | 63 | ->subject($this->subject); |
@@ -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 | { |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | public function debugDatabaseQueries($log = true, $terminal = false) |
28 | 28 | { |
29 | 29 | if (Config::get('database.query_debugging')) { |
30 | - DB::listen(function ($event) use ($terminal, $log) { |
|
30 | + DB::listen(function($event) use ($terminal, $log) { |
|
31 | 31 | $fullQuery = vsprintf(str_replace(['%', '?'], ['%%', '%s'], $event->sql), $event->bindings); |
32 | 32 | |
33 | 33 | $text = $event->connectionName . ' (' . $event->time . '): ' . $fullQuery; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function changeTheDefaultDatabaseModelsFactoriesPath($customPath) |
52 | 52 | { |
53 | - $this->app->singleton(\Illuminate\Database\Eloquent\Factory::class, function ($app) use ($customPath) { |
|
53 | + $this->app->singleton(\Illuminate\Database\Eloquent\Factory::class, function($app) use ($customPath) { |
|
54 | 54 | $faker = $app->make(\Faker\Generator::class); |
55 | 55 | |
56 | 56 | return \Illuminate\Database\Eloquent\Factory::construct($faker, base_path() . $customPath); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $allServiceProviders[] = PortButler::buildMainServiceProvider($containersNamespace, $containerName); |
82 | 82 | } |
83 | 83 | |
84 | - return array_unique($allServiceProviders) ? : []; |
|
84 | + return array_unique($allServiceProviders) ?: []; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | // if DataArray `\League\Fractal\Serializer\DataArraySerializer` do noting since it's set by default by the Dingo API |
118 | 118 | if ($serializerName !== 'DataArray') { |
119 | - app('Dingo\Api\Transformer\Factory')->setAdapter(function () use ($serializerName) { |
|
119 | + app('Dingo\Api\Transformer\Factory')->setAdapter(function() use ($serializerName) { |
|
120 | 120 | switch ($serializerName) { |
121 | 121 | case 'JsonApi': |
122 | 122 | $serializer = new \League\Fractal\Serializer\JsonApiSerializer(Config::get('api.domain')); |
@@ -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 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $locale = $request->header('Content-Language'); |
39 | 39 | |
40 | 40 | // if the header is missed |
41 | - if(!$locale){ |
|
41 | + if (!$locale) { |
|
42 | 42 | // take the default local language |
43 | 43 | $locale = $this->app->config->get('app.locale'); |
44 | 44 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function register() |
20 | 20 | { |
21 | - $this->app->bind('PortButler', function () { |
|
21 | + $this->app->bind('PortButler', function() { |
|
22 | 22 | return $this->app->make(PortButler::class); |
23 | 23 | }); |
24 | 24 | } |
@@ -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 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | $middleware = App::make(VisitorsAuthentication::class); |
27 | 27 | |
28 | - $middleware->handle($request, function ($r) {}); |
|
28 | + $middleware->handle($request, function($r) {}); |
|
29 | 29 | |
30 | 30 | // assert a visitor was created in the DB |
31 | 31 | $this->seeInDatabase('users', ['visitor_id' => $visitorId]); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | $middleware = App::make(VisitorsAuthentication::class); |
42 | 42 | |
43 | - $middleware->handle($request, function ($r) {}); |
|
43 | + $middleware->handle($request, function($r) {}); |
|
44 | 44 | |
45 | 45 | // assert a visitor was created in the DB |
46 | 46 | $usersTotal = User::all()->count(); |