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.
@@ -52,10 +50,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, int $
5250
5351 /**
5452 * Returns the thrown exception.
55- *
56- * @return \Exception The thrown exception
5753 */
58- public function getException ()
54+ public function getException (): \ Exception
5955 {
6056 return $ this ->exception ;
6157 }
@@ -64,28 +60,24 @@ public function getException()
6460 * Replaces the thrown exception.
6561 *
6662 * This exception will be thrown if no response is set in the event.
67- *
68- * @param \Exception $exception The thrown exception
6963 */
70- public function setException (\Exception $ exception )
64+ public function setException (\Exception $ exception ): void
7165 {
7266 $ this ->exception = $ exception ;
7367 }
7468
7569 /**
7670 * Mark the event as allowing a custom response code.
7771 */
78- public function allowCustomResponseCode ()
72+ public function allowCustomResponseCode (): void
7973 {
8074 $ this ->allowCustomResponseCode = true ;
8175 }
8276
8377 /**
8478 * Returns true if the event allows a custom response code.
85- *
86- * @return bool
8779 */
88- public function isAllowingCustomResponseCode ()
80+ public function isAllowingCustomResponseCode (): bool
8981 {
9082 return $ this ->allowCustomResponseCode ;
9183 }
0 commit comments