File tree 3 files changed +4
-21
lines changed
3 files changed +4
-21
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- /*
4
- * This file is part of the ICanBoogie package.
5
- *
6
- * (c) Olivier Laviale <[email protected] >
7
- *
8
- * For the full copyright and license information, please view the LICENSE
9
- * file that was distributed with this source code.
10
- */
11
-
12
3
namespace ICanBoogie \HTTP \Responder ;
13
4
14
5
use ICanBoogie \HTTP \Request ;
22
13
/**
23
14
* Decorates a {@see Responder} with {@see BeforeRespondEvent} and {@see RespondEvent}.
24
15
*/
25
- final class WithEvent implements Responder
16
+ final readonly class WithEvent implements Responder
26
17
{
27
18
public function __construct (
28
- private readonly Responder $ responder
19
+ private Responder $ responder
29
20
) {
30
21
}
31
22
Original file line number Diff line number Diff line change 20
20
*/
21
21
class BeforeRespondEvent extends Event
22
22
{
23
- public ?Response $ response ;
24
-
25
23
public function __construct (
26
24
public readonly Request $ request ,
27
- ?Response &$ response = null
25
+ public ?Response &$ response = null
28
26
) {
29
- $ this ->response = &$ response ;
30
-
31
27
parent ::__construct ();
32
28
}
33
29
}
Original file line number Diff line number Diff line change 20
20
*/
21
21
class RespondEvent extends Event
22
22
{
23
- public ?Response $ response ;
24
-
25
23
public function __construct (
26
24
public readonly Request $ request ,
27
- ? Response &$ response = null
25
+ public Response &$ response,
28
26
) {
29
- $ this ->response = &$ response ;
30
-
31
27
parent ::__construct ();
32
28
}
33
29
}
You can’t perform that action at this time.
0 commit comments