@@ -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 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function send($data = []) |
63 | 63 | { |
64 | - if(!$this->fromEmail || !$this->toEmail){ |
|
64 | + if (!$this->fromEmail || !$this->toEmail) { |
|
65 | 65 | throw new EmailIsMissedException(); |
66 | 66 | } |
67 | 67 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // check if sending emails is enabled and if this is not running a testing environment |
71 | 71 | if (Config::get('mail.enabled')) { |
72 | 72 | |
73 | - Mail::queue('EmailTemplates.' . $this->template, $data, function ($m) { |
|
73 | + Mail::queue('EmailTemplates.' . $this->template, $data, function($m) { |
|
74 | 74 | $m->from($this->fromEmail, $this->fromName); |
75 | 75 | $m->to($this->toEmail, $this->toName) |
76 | 76 | ->subject($this->subject); |
@@ -19,8 +19,8 @@ |
||
19 | 19 | /* |
20 | 20 | * Authenticate the user's personal channel... |
21 | 21 | */ |
22 | - Broadcast::channel('App.User.*', function ($user, $userId) { |
|
23 | - return (int) $user->id === (int) $userId; |
|
22 | + Broadcast::channel('App.User.*', function($user, $userId) { |
|
23 | + return (int)$user->id === (int)$userId; |
|
24 | 24 | }); |
25 | 25 | } |
26 | 26 | } |
@@ -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 | } |
@@ -220,7 +220,7 @@ |
||
220 | 220 | */ |
221 | 221 | 'generator' => [ |
222 | 222 | 'basePath' => env('SRC_PATH'), |
223 | - 'rootNamespace' => env('ROOT_NAMESPACE').'\\', |
|
223 | + 'rootNamespace' => env('ROOT_NAMESPACE') . '\\', |
|
224 | 224 | 'paths' => [ |
225 | 225 | 'models' => 'Entities', |
226 | 226 | 'repositories' => 'Repositories', |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $apiVersionNumber = $this->getRouteFileVersionNumber($file); |
56 | 56 | |
57 | 57 | $this->apiRouter->version('v' . $apiVersionNumber, |
58 | - function (DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
58 | + function(DingoApiRouter $router) use ($file, $containerPath, $containersNamespace) { |
|
59 | 59 | |
60 | 60 | $controllerNamespace = $containersNamespace . '\\Containers\\' . basename($containerPath) . '\\UI\API\Controllers'; |
61 | 61 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'limit' => Config::get('api.limit'), |
69 | 69 | // The API limit expiry time. |
70 | 70 | 'expires' => Config::get('api.limit_expires'), |
71 | - ], function ($router) use ($file) { |
|
71 | + ], function($router) use ($file) { |
|
72 | 72 | |
73 | 73 | require $file->getPathname(); |
74 | 74 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $this->webRouter->group([ |
103 | 103 | 'middleware' => ['web'], |
104 | 104 | 'namespace' => $controllerNamespace, |
105 | - ], function (LaravelRouter $router) use ($file) { |
|
105 | + ], function(LaravelRouter $router) use ($file) { |
|
106 | 106 | require $file->getPathname(); |
107 | 107 | }); |
108 | 108 | } |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | protected function hashIds() |
144 | 144 | { |
145 | 145 | if (Config::get('hello.hash-id')) { |
146 | - Route::bind('id', function ($id, $route) { |
|
146 | + Route::bind('id', function($id, $route) { |
|
147 | 147 | return Hashids::decode($id)[0]; |
148 | 148 | }); |
149 | 149 | } |
@@ -355,7 +355,7 @@ |
||
355 | 355 | */ |
356 | 356 | public function injectEndpointId($endpoint, $id) |
357 | 357 | { |
358 | - if(Config::get('hello.hash-id')){ |
|
358 | + if (Config::get('hello.hash-id')) { |
|
359 | 359 | $id = Hashids::encode($id); |
360 | 360 | } |
361 | 361 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $repoName = ucfirst(strtolower($repoName)); |
52 | 52 | |
53 | 53 | // TODO: find a way to validate the repo! |
54 | - $process = new Process("rm -rf " . $ContainersPath . '/' .$repoName); |
|
54 | + $process = new Process("rm -rf " . $ContainersPath . '/' . $repoName); |
|
55 | 55 | $process->run(); |
56 | 56 | |
57 | 57 | if (!$process->isSuccessful()) { |