2626 * event.
2727 *
2828 * @author Bernhard Schussek <bschussek@gmail.com>
29- *
30- * @final since Symfony 4.4
3129 */
32- class ExceptionEvent extends RequestEvent
30+ final class ExceptionEvent extends RequestEvent
3331{
3432 /**
3533 * The exception object.
@@ -50,12 +48,7 @@ public function __construct(HttpKernelInterface $kernel, Request $request, int $
5048 $ this ->setException ($ e );
5149 }
5250
53- /**
54- * Returns the thrown exception.
55- *
56- * @return \Exception The thrown exception
57- */
58- public function getException ()
51+ public function getException (): \Exception
5952 {
6053 return $ this ->exception ;
6154 }
@@ -64,28 +57,24 @@ public function getException()
6457 * Replaces the thrown exception.
6558 *
6659 * This exception will be thrown if no response is set in the event.
67- *
68- * @param \Exception $exception The thrown exception
6960 */
70- public function setException (\Exception $ exception )
61+ public function setException (\Exception $ exception ): void
7162 {
7263 $ this ->exception = $ exception ;
7364 }
7465
7566 /**
7667 * Mark the event as allowing a custom response code.
7768 */
78- public function allowCustomResponseCode ()
69+ public function allowCustomResponseCode (): void
7970 {
8071 $ this ->allowCustomResponseCode = true ;
8172 }
8273
8374 /**
8475 * Returns true if the event allows a custom response code.
85- *
86- * @return bool
8776 */
88- public function isAllowingCustomResponseCode ()
77+ public function isAllowingCustomResponseCode (): bool
8978 {
9079 return $ this ->allowCustomResponseCode ;
9180 }
0 commit comments