File tree Expand file tree Collapse file tree 2 files changed +8
-34
lines changed Expand file tree Collapse file tree 2 files changed +8
-34
lines changed Original file line number Diff line number Diff line change 7
7
8
8
final class HtaccessClient
9
9
{
10
- private ClientInterface $ httpClient ;
11
- private ServerRequestFactoryInterface $ requestFactory ;
12
-
13
- public function __construct (ClientInterface $ httpClient , ServerRequestFactoryInterface $ requestFactory )
14
- {
15
- $ this ->httpClient = $ httpClient ;
16
- $ this ->requestFactory = $ requestFactory ;
10
+ public function __construct (
11
+ private ClientInterface $ httpClient ,
12
+ private ServerRequestFactoryInterface $ requestFactory
13
+ ) {
17
14
}
18
15
19
16
/**
Original file line number Diff line number Diff line change 5
5
final class HtaccessResult
6
6
{
7
7
/**
8
- * @var string
8
+ * @param ResultLine[] $lines
9
9
*/
10
- private $ outputUrl ;
11
-
12
- /**
13
- * @var ResultLine[]
14
- */
15
- private $ lines = [];
16
-
17
- /**
18
- * @var int?
19
- */
20
- private $ outputStatusCode ;
21
-
22
10
public function __construct (
23
- string $ outputUrl ,
24
- array $ lines ,
25
- ?int $ outputStatusCode
11
+ private string $ outputUrl ,
12
+ private array $ lines ,
13
+ private ?int $ outputStatusCode
26
14
) {
27
- $ this ->outputUrl = $ outputUrl ;
28
- $ this ->outputStatusCode = $ outputStatusCode ;
29
-
30
- foreach ($ lines as $ line ) {
31
- $ this ->addLine ($ line );
32
- }
33
15
}
34
16
35
17
public function getOutputUrl (): string
@@ -49,9 +31,4 @@ public function getOutputStatusCode(): ?int
49
31
{
50
32
return $ this ->outputStatusCode ;
51
33
}
52
-
53
- private function addLine (ResultLine $ line ): void
54
- {
55
- $ this ->lines [] = $ line ;
56
- }
57
34
}
You can’t perform that action at this time.
0 commit comments