@@ -36,7 +36,7 @@ abstract class Handler
3636 /**
3737 * Constructor.
3838 *
39- * @param JsonApi\Request $request
39+ * @param \EchoIt\ JsonApi\Request $request
4040 */
4141 public function __construct (Request $ request )
4242 {
@@ -57,7 +57,8 @@ public function supportsMethod($method)
5757 /**
5858 * Fulfill the API request and return a response.
5959 *
60- * @return JsonApi\Response
60+ * @return \EchoIT\JsonApi\Response
61+ * @throws Exception
6162 */
6263 public function fulfillRequest ()
6364 {
@@ -135,6 +136,7 @@ protected function loadRelatedModels(Model $model) {
135136 /**
136137 * Returns which requested resources are available to include.
137138 *
139+ * @param Model $model
138140 * @return array
139141 */
140142 protected function exposedRelationsFromRequest ($ model = null )
@@ -174,7 +176,7 @@ protected function unknownRelationsFromRequest()
174176 /**
175177 * Iterate through result set to fetch the requested resources to include.
176178 *
177- * @param Illuminate\Database\Eloquent\Collection|JsonApi\Model $models
179+ * @param \ Illuminate\Database\Eloquent\Collection|\EchoIT\ JsonApi\Model $models
178180 * @return array
179181 */
180182 protected function getIncludedModels ($ models )
@@ -315,9 +317,10 @@ protected static function methodHandlerName($method)
315317 /**
316318 * Returns the models from a relationship. Will always return as array.
317319 *
318- * @param Illuminate\Database\Eloquent\Model $model
320+ * @param \ Illuminate\Database\Eloquent\Model $model
319321 * @param string $relationKey
320- * @return array|Illuminate\Database\Eloquent\Collection
322+ * @return array|\Illuminate\Database\Eloquent\Collection
323+ * @throws Exception
321324 */
322325 protected static function getModelsForRelation ($ model , $ relationKey )
323326 {
@@ -346,7 +349,7 @@ protected static function getModelsForRelation($model, $relationKey)
346349 *
347350 * @param array &$array
348351 * @param string $key
349- * @return Illuminate\Database\Eloquent\Collection
352+ * @return \ Illuminate\Database\Eloquent\Collection
350353 */
351354 protected static function getCollectionOrCreate (&$ array , $ key )
352355 {
@@ -374,8 +377,9 @@ protected static function getModelNameForRelation($relationName)
374377 * Function to handle sorting requests.
375378 *
376379 * @param array $cols list of column names to sort on
377- * @param EchoIt\JsonApi\Model $model
378- * @return EchoIt\JsonApi\Model
380+ * @param \EchoIt\JsonApi\Model $model
381+ * @return \EchoIt\JsonApi\Model
382+ * @throws Exception
379383 */
380384 protected function handleSortRequest ($ cols , $ model )
381385 {
@@ -404,6 +408,7 @@ protected function handleSortRequest($cols, $model)
404408 * @param string $content
405409 * @param string $type the type the content is expected to be.
406410 * @return array
411+ * @throws Exception
407412 */
408413 protected function parseRequestContent ($ content , $ type )
409414 {
@@ -439,10 +444,10 @@ protected function parseRequestContent($content, $type)
439444 /**
440445 * Function to handle pagination requests.
441446 *
442- * @param EchoIt\JsonApi\Request $request
443- * @param EchoIt\JsonApi\Model $model
447+ * @param \ EchoIt\JsonApi\Request $request
448+ * @param \ EchoIt\JsonApi\Model $model
444449 * @param integer $total the total number of records
445- * @return Illuminate\Pagination\LengthAwarePaginator
450+ * @return \ Illuminate\Pagination\LengthAwarePaginator
446451 */
447452 protected function handlePaginationRequest ($ request , $ model , $ total = null )
448453 {
@@ -473,8 +478,8 @@ protected function handlePaginationRequest($request, $model, $total = null)
473478 * Function to handle filtering requests.
474479 *
475480 * @param array $filters key=>value pairs of column and value to filter on
476- * @param EchoIt\JsonApi\Model $model
477- * @return EchoIt\JsonApi\Model
481+ * @param \ EchoIt\JsonApi\Model $model
482+ * @return \ EchoIt\JsonApi\Model
478483 */
479484 protected function handleFilterRequest ($ filters , $ model )
480485 {
@@ -488,9 +493,10 @@ protected function handleFilterRequest($filters, $model)
488493 * Default handling of GET request.
489494 * Must be called explicitly in handleGet function.
490495 *
491- * @param EchoIt\JsonApi\Request $request
492- * @param EchoIt\JsonApi\Model $model
493- * @return EchoIt\JsonApi\Model|Illuminate\Pagination\LengthAwarePaginator
496+ * @param \EchoIt\JsonApi\Request $request
497+ * @param \EchoIt\JsonApi\Model $model
498+ * @return \EchoIt\JsonApi\Model|\Illuminate\Pagination\LengthAwarePaginator
499+ * @throws Exception
494500 */
495501 protected function handleGetDefault (Request $ request , $ model )
496502 {
@@ -531,12 +537,12 @@ protected function handleGetDefault(Request $request, $model)
531537 * Validates passed data against a model
532538 * Validation performed safely and only if model provides rules
533539 *
534- * @param EchoIt\JsonApi\Model $model model to validate against
535- * @param Array $values passed array of values
540+ * @param \ EchoIt\JsonApi\Model $model model to validate against
541+ * @param Array $values passed array of values
536542 *
537- * @throws Exception\Validation Exception thrown when validation fails
543+ * @throws Exception\Validation Exception thrown when validation fails
538544 *
539- * @return Bool true if validation successful
545+ * @return Bool true if validation successful
540546 */
541547 protected function validateModelData (Model $ model , Array $ values )
542548 {
@@ -558,9 +564,10 @@ protected function validateModelData(Model $model, Array $values)
558564 * Default handling of POST request.
559565 * Must be called explicitly in handlePost function.
560566 *
561- * @param EchoIt\JsonApi\Request $request
562- * @param EchoIt\JsonApi\Model $model
563- * @return EchoIt\JsonApi\Model
567+ * @param \EchoIt\JsonApi\Request $request
568+ * @param \EchoIt\JsonApi\Model $model
569+ * @return \EchoIt\JsonApi\Model
570+ * @throws Exception
564571 */
565572 public function handlePostDefault (Request $ request , $ model )
566573 {
@@ -584,9 +591,10 @@ public function handlePostDefault(Request $request, $model)
584591 * Default handling of PUT request.
585592 * Must be called explicitly in handlePut function.
586593 *
587- * @param EchoIt\JsonApi\Request $request
588- * @param EchoIt\JsonApi\Model $model
589- * @return EchoIt\JsonApi\Model
594+ * @param \EchoIt\JsonApi\Request $request
595+ * @param \EchoIt\JsonApi\Model $model
596+ * @return \EchoIt\JsonApi\Model
597+ * @throws Exception
590598 */
591599 public function handlePutDefault (Request $ request , $ model )
592600 {
@@ -639,9 +647,10 @@ public function handlePutDefault(Request $request, $model)
639647 * Default handling of DELETE request.
640648 * Must be called explicitly in handleDelete function.
641649 *
642- * @param EchoIt\JsonApi\Request $request
643- * @param EchoIt\JsonApi\Model $model
644- * @return EchoIt\JsonApi\Model
650+ * @param \EchoIt\JsonApi\Request $request
651+ * @param \EchoIt\JsonApi\Model $model
652+ * @return \EchoIt\JsonApi\Model
653+ * @throws Exception
645654 */
646655 public function handleDeleteDefault (Request $ request , $ model )
647656 {
0 commit comments