File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 55
66use Exception ;
77use RuntimeException ;
8+ use Throwable ;
89
910class HttpErrorException extends Exception
1011{
@@ -61,13 +62,13 @@ class HttpErrorException extends Exception
6162 /**
6263 * Create and returns a new instance
6364 *
64- * @param int $code A valid http error code
65- * @param array $context
66- * @param Exception| Throwable|null $previous
65+ * @param int $code A valid http error code
66+ * @param array $context
67+ * @param Throwable|null $previous
6768 *
6869 * @return static
6970 */
70- public static function create (int $ code = 500 , array $ context = [], $ previous = null )
71+ public static function create (int $ code = 500 , array $ context = [], Throwable $ previous = null )
7172 {
7273 if (!isset (self ::$ phrases [$ code ])) {
7374 throw new RuntimeException ("Http error not valid ( {$ code }) " );
@@ -90,7 +91,7 @@ public function setContext(array $context)
9091 /**
9192 * Return the data context
9293 */
93- public function getContext ()
94+ public function getContext (): array
9495 {
9596 return $ this ->context ;
9697 }
You can’t perform that action at this time.
0 commit comments