Skip to content

Commit 5ce7191

Browse files
committed
typing fix
1 parent 3e41b0d commit 5ce7191

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/HttpErrorException.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
use Exception;
77
use RuntimeException;
8+
use Throwable;
89

910
class 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
}

0 commit comments

Comments
 (0)