Completed
Push — master ( a3397f...4001aa )
by Alexander
03:06
created
src/Responder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
      * Transform the data using the given transformer.
142 142
      *
143 143
      * @param  Transformable|Collection $data
144
-     * @param  Transformer|null         $transformer
144
+     * @param  Transformer         $transformer
145 145
      * @param  string                   $resourceKey
146 146
      * @return ResourceInterface
147 147
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  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( $data, $statusCode, $meta ) = [ null, $data, $statusCode ];
39
+            list($data, $statusCode, $meta) = [ null, $data, $statusCode ];
40 40
         } elseif ( is_array( $statusCode ) ) {
41
-            list( $statusCode, $meta ) = [ 200, $statusCode ];
41
+            list($statusCode, $meta) = [ 200, $statusCode ];
42 42
         }
43 43
 
44 44
         $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.