@@ -78,7 +78,7 @@ abstract protected function transformer();
78
78
/**
79
79
* Getter for statusCode.
80
80
*
81
- * @return mixed
81
+ * @return integer
82
82
*/
83
83
public function getStatusCode ()
84
84
{
@@ -103,7 +103,7 @@ public function setStatusCode($statusCode)
103
103
* Respond with a given item.
104
104
*
105
105
* @param $item
106
- * @param $callback
106
+ * @param \League\Fractal\TransformerAbstract $callback
107
107
*
108
108
* @return mixed
109
109
*/
@@ -120,7 +120,7 @@ protected function respondWithItem($item, $callback)
120
120
* Respond with a given collection.
121
121
*
122
122
* @param $collection
123
- * @param $callback
123
+ * @param \League\Fractal\TransformerAbstract $callback
124
124
*
125
125
* @return mixed
126
126
*/
@@ -149,7 +149,7 @@ protected function respondWithArray(array $array, array $headers = [])
149
149
/**
150
150
* Response with the current error.
151
151
*
152
- * @param $message
152
+ * @param string $message
153
153
*
154
154
* @return mixed
155
155
*/
@@ -166,17 +166,14 @@ protected function respondWithError($message)
166
166
/**
167
167
* Prepare root scope and adds meta.
168
168
*
169
- * @param Item $resource
169
+ * @param Item|Collection $resource
170
170
*
171
- * @return mixed
171
+ * @return \League\Fractal\Scope
172
172
*/
173
173
protected function prepareRootScope ($ resource )
174
174
{
175
- $ availableIncludes = $ resource ->getTransformer ()->getAvailableIncludes ();
176
- $ resource ->setMetaValue ('available_includes ' , $ availableIncludes );
177
-
178
- $ defaultIncludes = $ resource ->getTransformer ()->getDefaultIncludes ();
179
- $ resource ->setMetaValue ('default_includes ' , $ defaultIncludes );
175
+ $ resource ->setMetaValue ('available_includes ' , $ this ->transformer ->getAvailableIncludes ());
176
+ $ resource ->setMetaValue ('default_includes ' , $ this ->transformer ->getDefaultIncludes ());
180
177
181
178
return $ this ->fractal ->createData ($ resource );
182
179
}
@@ -194,7 +191,7 @@ protected function rulesForCreate()
194
191
/**
195
192
* Get the validation rules for update.
196
193
*
197
- * @param $id
194
+ * @param integer $id
198
195
*
199
196
* @return array
200
197
*/
@@ -218,7 +215,7 @@ public function errorForbidden($message = 'Forbidden')
218
215
/**
219
216
* Generate a Response with a 500 HTTP header and a given message.
220
217
*
221
- * @param $message
218
+ * @param string $message
222
219
*
223
220
* @return Response
224
221
*/
@@ -230,7 +227,7 @@ public function errorInternalError($message = 'Internal Error')
230
227
/**
231
228
* Generate a Response with a 404 HTTP header and a given message.
232
229
*
233
- * @param $message
230
+ * @param string $message
234
231
*
235
232
* @return Response
236
233
*/
@@ -242,7 +239,7 @@ public function errorNotFound($message = 'Resource Not Found')
242
239
/**
243
240
* Generate a Response with a 401 HTTP header and a given message.
244
241
*
245
- * @param $message
242
+ * @param string $message
246
243
*
247
244
* @return Response
248
245
*/
@@ -254,7 +251,7 @@ public function errorUnauthorized($message = 'Unauthorized')
254
251
/**
255
252
* Generate a Response with a 400 HTTP header and a given message.
256
253
*
257
- * @param $message
254
+ * @param string $message
258
255
*
259
256
* @return Response
260
257
*/
@@ -266,7 +263,7 @@ public function errorWrongArgs($message = 'Wrong Arguments')
266
263
/**
267
264
* Generate a Response with a 501 HTTP header and a given message.
268
265
*
269
- * @param $message
266
+ * @param string $message
270
267
*
271
268
* @return Response
272
269
*/
@@ -427,7 +424,7 @@ protected function getEagerLoad()
427
424
/**
428
425
* Get item according to mode.
429
426
*
430
- * @param $id
427
+ * @param integer $id
431
428
* @param array $with
432
429
*
433
430
* @return mixed
0 commit comments