Completed
Push — master ( bf662c...a3397f )
by Alexander
01:50
created
src/ResponderServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         } );
67 67
 
68 68
         $this->app->singleton( ManagerContract::class, function () {
69
-            return ( new Manager() )->setSerializer( new $this->config[ 'serializer' ] );
69
+            return (new Manager())->setSerializer( new $this->config[ 'serializer' ] );
70 70
         } );
71 71
 
72 72
         include __DIR__ . '/helpers.php';
Please login to merge, or discard this patch.
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.
src/Traits/ConvertsParameters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      */
129 129
     protected function castToBooleanIsDisabled():bool
130 130
     {
131
-        return isset( $this->castBooleans ) && ! $this->castBooleans;
131
+        return isset($this->castBooleans) && ! $this->castBooleans;
132 132
     }
133 133
 
134 134
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     protected function convertToSnakeCaseIsDisabled():bool
140 140
     {
141
-        return isset( $this->convertToSnakeCase ) && ! $this->convertToSnakeCase;
141
+        return isset($this->convertToSnakeCase) && ! $this->convertToSnakeCase;
142 142
     }
143 143
 
144 144
     /**
Please login to merge, or discard this patch.
src/Traits/MakesApiRequests.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,6 @@
 block discarded – undo
103 103
     /**
104 104
      * Decodes JSON response and returns the data.
105 105
      *
106
-     * @param  string|array $field
107 106
      * @return array
108 107
      */
109 108
     protected function getSuccessData( $attributes = null )
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
         $data = [ ];
120 120
 
121 121
         foreach ( $attributes as $attribute ) {
122
-            $data[] = array_get( $rawData, $attribute );
122
+            $data[ ] = array_get( $rawData, $attribute );
123 123
         }
124 124
 
125 125
         return $data;
Please login to merge, or discard this patch.