Completed
Push — master ( cf5c1f...de0cb7 )
by Mads
05:31
created
src/Auth/AuthServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Requests/Provider/RequestServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Router/Provider/RouterServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
src/Controllers/ApiController.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,10 +128,10 @@
 block discarded – undo
128 128
     }
129 129
     
130 130
         /**
131
-     * @param string $message
132
-     * @param array $headers
133
-     * @return JsonResponse
134
-     */
131
+         * @param string $message
132
+         * @param array $headers
133
+         * @return JsonResponse
134
+         */
135 135
     public function responseAccepted(
136 136
         string $message = 'The request was accepted for processing',
137 137
         array $headers = []
Please login to merge, or discard this patch.
src/Transformers/ApiTransformer.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,8 +115,7 @@  discard block
 block discarded – undo
115 115
         foreach ($relationships as $relationshipName => $relationship) {
116 116
             if (null === $relationship) {
117 117
                 $output[$relationshipName] = $this->isMapped($relationshipName) ? $this->convertValueType($relationshipName, null) : null;
118
-            }
119
-            else if (true === $relationship instanceof Collection) {
118
+            } else if (true === $relationship instanceof Collection) {
120 119
                 // do not transform empty relationships
121 120
                 if ($relationship->isEmpty()) {
122 121
                     continue;
@@ -127,8 +126,7 @@  discard block
 block discarded – undo
127 126
                 } else {
128 127
                     $output[$relationshipName] = $relationship->toArray();
129 128
                 }
130
-            }
131
-            else {
129
+            } else {
132 130
                 // model
133 131
                 if ($this->isTransformAware($relationship)) {
134 132
                     $output[$relationshipName] = $relationship->getTransformer()->transformOutput($relationship);
Please login to merge, or discard this patch.
src/Requests/ApiRequest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         /**
69 69
          * Remove input fields like _method, _token, etc.
70 70
          */
71
-        $input = array_filter($this->input(), function ($key) {
71
+        $input = array_filter($this->input(), function($key) {
72 72
             return !starts_with($key, '_');
73 73
         }, ARRAY_FILTER_USE_KEY);
74 74
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $input = $this->getTransformer()->transformOutput($this->except($this->dontFlash));
123 123
         $errors = collect($this->getTransformer()->transformOutput($validator->getMessageBag()->toArray()))
124
-            ->reject(function ($error) {
124
+            ->reject(function($error) {
125 125
                 return false === \is_array($error);
126 126
             })
127 127
             ->toArray();
Please login to merge, or discard this patch.