44
55use Exception ;
66use InvalidArgumentException ;
7- use SMartins \Exceptions \JsonApi \Error ;
87use Illuminate \Auth \AuthenticationException ;
98use Illuminate \Validation \ValidationException ;
109use SMartins \Exceptions \Response \ErrorHandledInterface ;
@@ -60,9 +59,7 @@ public function __construct(Exception $e)
6059 * Handle with an exception according to specific definitions. Returns one
6160 * or more errors using the exception from $exceptions attribute.
6261 *
63- * @todo Change the return type to any interface to make more extensible.
64- *
65- * @return \SMartins\Exceptions\Response\ErrorHandledInterface|\Smartins\Exceptions\Response\ErrorHandledCollectionInterface
62+ * @return ErrorHandledInterface|ErrorHandledCollectionInterface
6663 */
6764 abstract public function handle ();
6865
@@ -85,6 +82,7 @@ public function getCode($type = 'default')
8582 * Return response with handled exception.
8683 *
8784 * @return \SMartins\Exceptions\Response\AbstractResponse
85+ * @throws \SMartins\Exceptions\Response\InvalidContentException
8886 */
8987 public function handleException ()
9088 {
@@ -100,10 +98,10 @@ public function handleException()
10098 /**
10199 * Validate response from handle method of handler class.
102100 *
103- * @param \SMartins\Exceptions\Response\ ErrorHandledInterface|\Smartins\Exceptions\Response\ ErrorHandledCollectionInterface
104- * @return \SMartins\Exceptions\Response\ ErrorHandledCollectionInterface
101+ * @param ErrorHandledInterface|ErrorHandledCollectionInterface
102+ * @return ErrorHandledCollectionInterface
105103 *
106- * @throws \InvalidArgumentException
104+ * @throws \SMartins\Exceptions\Response\InvalidContentException
107105 */
108106 public function validatedHandledException ($ error )
109107 {
@@ -216,6 +214,7 @@ public function getResponseHandler()
216214 * Set exception handlers.
217215 *
218216 * @param array $handlers
217+ * @return AbstractHandler
219218 */
220219 public function setExceptionHandlers (array $ handlers )
221220 {
0 commit comments