Completed
Push — master ( 47a9a3...099793 )
by Alexander
03:06
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/Traits/ConvertsParameters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function castBooleans( $input ):array
89 89
     {
90
-        if ( isset( $this->castBooleans ) && ! $this->castBooleans ) {
90
+        if ( isset($this->castBooleans) && ! $this->castBooleans ) {
91 91
             return;
92 92
         }
93 93
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     protected function castValueToBoolean( $value )
110 110
     {
111
-        if ( isset( $this->convertToSnakeCase ) && ! $this->convertToSnakeCase ) {
111
+        if ( isset($this->convertToSnakeCase) && ! $this->convertToSnakeCase ) {
112 112
             return;
113 113
         }
114 114
 
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.