@@ -85,7 +85,7 @@ trait ResponseTrait
8585 *
8686 * @param array|string|null $data
8787 *
88- * @return mixed
88+ * @return Response
8989 */
9090 protected function respond ($ data = null , ?int $ status = null , string $ message = '' )
9191 {
@@ -119,7 +119,7 @@ protected function respond($data = null, ?int $status = null, string $message =
119119 * @param int $status HTTP status code
120120 * @param string|null $code Custom, API-specific, error code
121121 *
122- * @return mixed
122+ * @return Response
123123 */
124124 protected function fail ($ messages , int $ status = 400 , ?string $ code = null , string $ customMessage = '' )
125125 {
@@ -145,7 +145,7 @@ protected function fail($messages, int $status = 400, ?string $code = null, stri
145145 *
146146 * @param mixed $data
147147 *
148- * @return mixed
148+ * @return Response
149149 */
150150 protected function respondCreated ($ data = null , string $ message = '' )
151151 {
@@ -157,7 +157,7 @@ protected function respondCreated($data = null, string $message = '')
157157 *
158158 * @param mixed $data
159159 *
160- * @return mixed
160+ * @return Response
161161 */
162162 protected function respondDeleted ($ data = null , string $ message = '' )
163163 {
@@ -169,7 +169,7 @@ protected function respondDeleted($data = null, string $message = '')
169169 *
170170 * @param mixed $data
171171 *
172- * @return mixed
172+ * @return Response
173173 */
174174 protected function respondUpdated ($ data = null , string $ message = '' )
175175 {
@@ -180,7 +180,7 @@ protected function respondUpdated($data = null, string $message = '')
180180 * Used after a command has been successfully executed but there is no
181181 * meaningful reply to send back to the client.
182182 *
183- * @return mixed
183+ * @return Response
184184 */
185185 protected function respondNoContent (string $ message = 'No Content ' )
186186 {
@@ -192,7 +192,7 @@ protected function respondNoContent(string $message = 'No Content')
192192 * or had bad authorization credentials. User is encouraged to try again
193193 * with the proper information.
194194 *
195- * @return mixed
195+ * @return Response
196196 */
197197 protected function failUnauthorized (string $ description = 'Unauthorized ' , ?string $ code = null , string $ message = '' )
198198 {
@@ -203,7 +203,7 @@ protected function failUnauthorized(string $description = 'Unauthorized', ?strin
203203 * Used when access is always denied to this resource and no amount
204204 * of trying again will help.
205205 *
206- * @return mixed
206+ * @return Response
207207 */
208208 protected function failForbidden (string $ description = 'Forbidden ' , ?string $ code = null , string $ message = '' )
209209 {
@@ -213,7 +213,7 @@ protected function failForbidden(string $description = 'Forbidden', ?string $cod
213213 /**
214214 * Used when a specified resource cannot be found.
215215 *
216- * @return mixed
216+ * @return Response
217217 */
218218 protected function failNotFound (string $ description = 'Not Found ' , ?string $ code = null , string $ message = '' )
219219 {
@@ -223,7 +223,7 @@ protected function failNotFound(string $description = 'Not Found', ?string $code
223223 /**
224224 * Used when the data provided by the client cannot be validated.
225225 *
226- * @return mixed
226+ * @return Response
227227 *
228228 * @deprecated Use failValidationErrors instead
229229 */
@@ -237,7 +237,7 @@ protected function failValidationError(string $description = 'Bad Request', ?str
237237 *
238238 * @param string|string[] $errors
239239 *
240- * @return mixed
240+ * @return Response
241241 */
242242 protected function failValidationErrors ($ errors , ?string $ code = null , string $ message = '' )
243243 {
@@ -247,7 +247,7 @@ protected function failValidationErrors($errors, ?string $code = null, string $m
247247 /**
248248 * Use when trying to create a new resource and it already exists.
249249 *
250- * @return mixed
250+ * @return Response
251251 */
252252 protected function failResourceExists (string $ description = 'Conflict ' , ?string $ code = null , string $ message = '' )
253253 {
@@ -259,7 +259,7 @@ protected function failResourceExists(string $description = 'Conflict', ?string
259259 * Not Found, because here we know the data previously existed, but is now gone,
260260 * where Not Found means we simply cannot find any information about it.
261261 *
262- * @return mixed
262+ * @return Response
263263 */
264264 protected function failResourceGone (string $ description = 'Gone ' , ?string $ code = null , string $ message = '' )
265265 {
@@ -269,7 +269,7 @@ protected function failResourceGone(string $description = 'Gone', ?string $code
269269 /**
270270 * Used when the user has made too many requests for the resource recently.
271271 *
272- * @return mixed
272+ * @return Response
273273 */
274274 protected function failTooManyRequests (string $ description = 'Too Many Requests ' , ?string $ code = null , string $ message = '' )
275275 {
0 commit comments