@@ -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 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | protected function transformAttributes(array $output, array $data): array |
| 111 | 111 | { |
| 112 | 112 | foreach ($data as $key => $value) { |
| 113 | - if (true === $this->strict && ! $this->isMapped($key)) { |
|
| 113 | + if (true === $this->strict && !$this->isMapped($key)) { |
|
| 114 | 114 | continue; |
| 115 | 115 | } |
| 116 | 116 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** @var Model $data */ |
| 132 | 132 | $relationships = $data->getRelations(); |
| 133 | 133 | foreach ($relationships as $relationshipName => $relationship) { |
| 134 | - if (true === $this->strict && ! $this->isMapped($relationshipName)) { |
|
| 134 | + if (true === $this->strict && !$this->isMapped($relationshipName)) { |
|
| 135 | 135 | continue; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | $this->mergeConfigFrom($this->configPath(), 'api-core'); |
| 19 | 19 | |
| 20 | - Auth::extend('api', function ($app, $name, array $config) { |
|
| 20 | + Auth::extend('api', function($app, $name, array $config) { |
|
| 21 | 21 | return new ApiGuard(Auth::createUserProvider($config['provider']), $app['request'], $app['config']->get('api-core.api-key')); |
| 22 | 22 | }); |
| 23 | 23 | } |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * Remove input fields like _method, _token, etc. |
| 74 | 74 | */ |
| 75 | - $input = array_filter($this->input(), function ($key) { |
|
| 76 | - return ! Str::startsWith($key, '_'); |
|
| 75 | + $input = array_filter($this->input(), function($key) { |
|
| 76 | + return !Str::startsWith($key, '_'); |
|
| 77 | 77 | }, ARRAY_FILTER_USE_KEY); |
| 78 | 78 | |
| 79 | 79 | return $this->getTransformer()->transformInput($input); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | protected function transformValidationOutput($validator): array |
| 155 | 155 | { |
| 156 | 156 | return collect($this->getTransformer()->transformOutputKeys($validator->getMessageBag()->toArray())) |
| 157 | - ->reject(function ($error) { |
|
| 157 | + ->reject(function($error) { |
|
| 158 | 158 | return false === \is_array($error); |
| 159 | 159 | }) |
| 160 | 160 | ->toArray(); |