Completed
Push — master ( 47a9a3...099793 )
by Alexander
03:06
created
src/Responder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
     public function success( $data = null, $statusCode = 200, $meta = null ):JsonResponse
37 37
     {
38 38
         if ( is_integer( $data ) ) {
39
-            list( $statusCode, $data ) = [ $data, null ];
39
+            list($statusCode, $data) = [ $data, null ];
40 40
         } elseif ( is_array( $statusCode ) ) {
41
-            list( $statusCode, $meta ) = [ 200, $statusCode ];
41
+            list($statusCode, $meta) = [ 200, $statusCode ];
42 42
         } elseif ( is_array( $data ) ) {
43
-            list( $data, $statusCode, $meta ) = [ null, 200, $data ];
43
+            list($data, $statusCode, $meta) = [ null, 200, $data ];
44 44
         }
45 45
 
46 46
         $resource = $this->transform( $data );
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         if ( ! is_null( $data ) ) {
116 116
             $transformer = $model::transformer();
117
-            $includes = ( new $transformer( $model ) )->getAvailableIncludes();
117
+            $includes = (new $transformer( $model ))->getAvailableIncludes();
118 118
             $manager = $manager->parseIncludes( $includes );
119 119
         }
120 120
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             throw new InvalidArgumentException( 'Data must only contain models implementing the Transformable contract.' );
206 206
         }
207 207
 
208
-        $collection->each( function ( $model ) use ( $class ) {
208
+        $collection->each( function ( $model ) use ($class) {
209 209
             if ( get_class( $model ) !== get_class( $class ) ) {
210 210
                 throw new InvalidArgumentException( 'You cannot transform arrays or collections with multiple model types.' );
211 211
             }
Please login to merge, or discard this patch.