Completed
Branch master (fb9551)
by Alexander
05:03
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   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function success( $data = null, int $statusCode = 200 ):JsonResponse
35 35
     {
36 36
         if ( is_integer( $data ) ) {
37
-            list( $statusCode, $data ) = [ $data, null ];
37
+            list($statusCode, $data) = [ $data, null ];
38 38
         }
39 39
 
40 40
         $resource = $this->transform( $data );
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             throw new InvalidArgumentException( 'Data must only contain models implementing the Transformable contract.' );
170 170
         }
171 171
 
172
-        $collection->each( function ( $model ) use ( $class ) {
172
+        $collection->each( function ( $model ) use ($class) {
173 173
             if ( get_class( $model ) !== get_class( $class ) ) {
174 174
                 throw new InvalidArgumentException( 'You cannot transform arrays or collections with multiple model types.' );
175 175
             }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         if ( ! is_null( $data ) ) {
189 189
             $transformer = $model::transformer();
190
-            $includes = ( new $transformer( $model ) )->getAvailableIncludes();
190
+            $includes = (new $transformer( $model ))->getAvailableIncludes();
191 191
             $manager = $manager->parseIncludes( $includes );
192 192
         }
193 193
 
Please login to merge, or discard this patch.
src/Traits/ConvertsToSnakeCase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     protected function castBooleans( $input ):array
71 71
     {
72
-        if ( isset( $this->convertToSnakeCase ) && ! $this->convertToSnakeCase ) {
72
+        if ( isset($this->convertToSnakeCase) && ! $this->convertToSnakeCase ) {
73 73
             return;
74 74
         }
75 75
 
Please login to merge, or discard this patch.