1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Exceptions: Added some types, simplified some classes

During review of #4291
This commit is contained in:
Dan Brown
2023-06-15 17:07:40 +01:00
parent 34d8268b2b
commit e72cf61f7e
2 changed files with 6 additions and 50 deletions

View File

@ -8,20 +8,8 @@ use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class PrettyException extends Exception implements Responsable, HttpExceptionInterface
{
/**
* @var ?string
*/
protected $subtitle = null;
/**
* @var ?string
*/
protected $details = null;
/**
* @var array
*/
protected $headers = [];
protected ?string $subtitle = null;
protected ?string $details = null;
/**
* Render a response for when this exception occurs.
@ -63,19 +51,9 @@ class PrettyException extends Exception implements Responsable, HttpExceptionInt
/**
* Get the desired HTTP headers for this exception.
* @return array<mixed>
*/
public function getHeaders(): array
{
return $this->headers;
}
/**
* Set the desired HTTP headers for this exception.
* @param array<mixed> $headers
*/
public function setHeaders(array $headers): void
{
$this->headers = $headers;
return [];
}
}