26
26
* event.
27
27
*
28
28
* @author Bernhard Schussek <bschussek@gmail.com>
29
- *
30
- * @final since Symfony 4.4
31
29
*/
32
- class ExceptionEvent extends RequestEvent
30
+ final class ExceptionEvent extends RequestEvent
33
31
{
34
32
/**
35
33
* The exception object.
@@ -52,10 +50,8 @@ public function __construct(HttpKernelInterface $kernel, Request $request, int $
52
50
53
51
/**
54
52
* Returns the thrown exception.
55
- *
56
- * @return \Exception The thrown exception
57
53
*/
58
- public function getException ()
54
+ public function getException (): \ Exception
59
55
{
60
56
return $ this ->exception ;
61
57
}
@@ -64,28 +60,24 @@ public function getException()
64
60
* Replaces the thrown exception.
65
61
*
66
62
* This exception will be thrown if no response is set in the event.
67
- *
68
- * @param \Exception $exception The thrown exception
69
63
*/
70
- public function setException (\Exception $ exception )
64
+ public function setException (\Exception $ exception ): void
71
65
{
72
66
$ this ->exception = $ exception ;
73
67
}
74
68
75
69
/**
76
70
* Mark the event as allowing a custom response code.
77
71
*/
78
- public function allowCustomResponseCode ()
72
+ public function allowCustomResponseCode (): void
79
73
{
80
74
$ this ->allowCustomResponseCode = true ;
81
75
}
82
76
83
77
/**
84
78
* Returns true if the event allows a custom response code.
85
- *
86
- * @return bool
87
79
*/
88
- public function isAllowingCustomResponseCode ()
80
+ public function isAllowingCustomResponseCode (): bool
89
81
{
90
82
return $ this ->allowCustomResponseCode ;
91
83
}
0 commit comments