Completed
Push — master ( 2d5c6f...ea456d )
by Alexander
06:30
created
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 1 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.
src/Factories/SuccessResponseFactory.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,6 @@  discard block
 block discarded – undo
117 117
     /**
118 118
      * Transform an Eloquent builder.
119 119
      *
120
-     * @param  Builder          $collection
121 120
      * @param  Transformer|null $transformer
122 121
      * @return FractalCollection
123 122
      */
@@ -145,7 +144,7 @@  discard block
 block discarded – undo
145 144
      * Transform the data using the given transformer.
146 145
      *
147 146
      * @param  Transformable|Collection $data
148
-     * @param  Transformer|null         $transformer
147
+     * @param  Transformer         $transformer
149 148
      * @param  string                   $resourceKey
150 149
      * @return ResourceInterface
151 150
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $transformer = $transformer ?: $model::transformer();
86 86
 
87 87
         if ( is_null( $transformer ) ) {
88
-            return new FractalItem( $model, function () use ( $model ) {
88
+            return new FractalItem( $model, function () use ($model) {
89 89
                 return $model->toArray();
90 90
             } );
91 91
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $transformer = $transformer ?: $model::transformer();
107 107
 
108 108
         if ( is_null( $transformer ) ) {
109
-            return new FractalCollection( $collection, function () use ( $collection ) {
109
+            return new FractalCollection( $collection, function () use ($collection) {
110 110
                 return $collection->toArray();
111 111
             } );
112 112
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
         if ( ! is_null( $data ) ) {
175 175
             $transformer = $model::transformer();
176
-            $includes = is_string( $transformer ) ? ( new $transformer( $model ) )->getAvailableIncludes() : [ ];
176
+            $includes = is_string( $transformer ) ? (new $transformer( $model ))->getAvailableIncludes() : [ ];
177 177
             $manager = $manager->parseIncludes( $includes );
178 178
         }
179 179
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             throw new InvalidArgumentException( 'Data must only contain models implementing the Transformable contract.' );
215 215
         }
216 216
 
217
-        $collection->each( function ( $model ) use ( $class ) {
217
+        $collection->each( function ( $model ) use ($class) {
218 218
             if ( get_class( $model ) !== get_class( $class ) ) {
219 219
                 throw new InvalidArgumentException( 'You cannot transform arrays or collections with multiple model types.' );
220 220
             }
Please login to merge, or discard this patch.
src/ResponderServiceProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     /**
109 109
      * Get the services provided by the provider.
110 110
      *
111
-     * @return array
111
+     * @return string[]
112 112
      */
113 113
     public function provides()
114 114
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,14 +91,14 @@
 block discarded – undo
91 91
             $successFactory = new SuccessResponseFactory( $statusCodes );
92 92
             $errorFactory = new ErrorResponseFactory( $statusCodes );
93 93
 
94
-            return ( new Responder( $successFactory, $errorFactory ) );
94
+            return (new Responder( $successFactory, $errorFactory ));
95 95
         } );
96 96
 
97 97
         $this->app->singleton( ManagerContract::class, function ( $app ) {
98
-            $serializerClass = $app->config->get( 'responder.serializer' );;
98
+            $serializerClass = $app->config->get( 'responder.serializer' ); ;
99 99
             $serializer = new $serializerClass;
100 100
 
101
-            return ( new Manager() )->setSerializer( new $serializer );
101
+            return (new Manager())->setSerializer( new $serializer );
102 102
         } );
103 103
 
104 104
         $this->app->alias( ResponderContract::class, 'responder' );
Please login to merge, or discard this patch.
src/Responder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
     public function success( $data = null, $statusCode = 200, array $meta = [ ] ):JsonResponse
54 54
     {
55 55
         if ( is_integer( $data ) ) {
56
-            list( $data, $statusCode, $meta ) = [ null, $data, $statusCode ];
56
+            list($data, $statusCode, $meta) = [ null, $data, $statusCode ];
57 57
         } elseif ( is_array( $statusCode ) ) {
58
-            list( $statusCode, $meta ) = [ 200, $statusCode ];
58
+            list($statusCode, $meta) = [ 200, $statusCode ];
59 59
         }
60 60
 
61 61
         return $this->successFactory->make( $data, $statusCode, $meta );
Please login to merge, or discard this patch.