@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function register() |
14 | 14 | { |
15 | - Auth::extend('api', function ($app, $name, array $config) { |
|
15 | + Auth::extend('api', function($app, $name, array $config) { |
|
16 | 16 | return new ApiGuard(Auth::createUserProvider($config['provider']), $app['request']); |
17 | 17 | }); |
18 | 18 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function boot() |
12 | 12 | { |
13 | 13 | if (false === Request::hasMacro('isApiInternalCall')) { |
14 | - Request::macro('isApiInternalCall', function () { |
|
14 | + Request::macro('isApiInternalCall', function() { |
|
15 | 15 | return $this->header(NappHttpHeaders::NAPP_API_CALL_TYPE) === 'internal'; |
16 | 16 | }); |
17 | 17 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function boot() |
15 | 15 | { |
16 | - $this->app->singleton('internalrouter', function () { |
|
16 | + $this->app->singleton('internalrouter', function() { |
|
17 | 17 | $app = app(); |
18 | 18 | |
19 | 19 | return new Router($app, $app['request'], $app['router']); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $message = $validator->messages()->first(); |
28 | 28 | |
29 | 29 | $exception = new ValidationException(); |
30 | - $exception->statusMessage = $exception->statusMessage.': '.$message; |
|
30 | + $exception->statusMessage = $exception->statusMessage . ': ' . $message; |
|
31 | 31 | $exception->validation = $validator->messages(); |
32 | 32 | |
33 | 33 | throw $exception; |
@@ -237,7 +237,7 @@ |
||
237 | 237 | $server = []; |
238 | 238 | |
239 | 239 | foreach ($headers as $headerType => $headerValue) { |
240 | - $headerType = 'HTTP_'.$headerType; |
|
240 | + $headerType = 'HTTP_' . $headerType; |
|
241 | 241 | |
242 | 242 | $server[$headerType] = $headerValue; |
243 | 243 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $rules = $this->rules(); |
58 | 58 | if (false === empty(array_diff_key($input, $rules))) { |
59 | 59 | $exception = new InvalidFieldException(); |
60 | - $exception->statusMessage = $exception->statusMessage.': '.implode(',', array_keys(array_diff_key($input, $rules))); |
|
60 | + $exception->statusMessage = $exception->statusMessage . ': ' . implode(',', array_keys(array_diff_key($input, $rules))); |
|
61 | 61 | |
62 | 62 | throw $exception; |
63 | 63 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | /** |
72 | 72 | * Remove input fields like _method, _token, etc. |
73 | 73 | */ |
74 | - $input = array_filter($this->input(), function ($key) { |
|
74 | + $input = array_filter($this->input(), function($key) { |
|
75 | 75 | return !starts_with($key, '_'); |
76 | 76 | }, ARRAY_FILTER_USE_KEY); |
77 | 77 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | $message = $validator->messages()->first(); |
115 | 115 | $exception = new ValidationException(); |
116 | - $exception->statusMessage = $exception->statusMessage.': '.$message; |
|
116 | + $exception->statusMessage = $exception->statusMessage . ': ' . $message; |
|
117 | 117 | $exception->validation = $this->transformValidationOutput($validator); |
118 | 118 | |
119 | 119 | throw $exception; |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | protected function transformValidationOutput($validator): array |
154 | 154 | { |
155 | 155 | return collect($this->getTransformer()->transformOutputKeys($validator->getMessageBag()->toArray())) |
156 | - ->reject(function ($error) { |
|
156 | + ->reject(function($error) { |
|
157 | 157 | return false === \is_array($error); |
158 | 158 | }) |
159 | 159 | ->toArray(); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | if (false === empty($arguments)) { |
48 | - $callArguments = [$url.'?'.http_build_query($arguments)]; |
|
48 | + $callArguments = [$url . '?' . http_build_query($arguments)]; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $this->{$requestMethod}(...$callArguments); |