File tree Expand file tree Collapse file tree 10 files changed +7
-65
lines changed
Expand file tree Collapse file tree 10 files changed +7
-65
lines changed Original file line number Diff line number Diff line change 77
88final class AlternativeLoader implements StepBuilderInterface
99{
10- private ?Node \Expr $ logger ;
11- private ?Node \Expr $ rejection ;
12- private ?Node \Expr $ state ;
1310 /** @var array<array-key, array{value: Node\Expr, type: string}> */
1411 private array $ parameters ;
1512
1613 public function __construct (
1714 private Node \Expr $ query
1815 ) {
19- $ this ->logger = null ;
20- $ this ->rejection = null ;
21- $ this ->state = null ;
2216 $ this ->parameters = [];
2317 }
2418
2519 public function withLogger (Node \Expr $ logger ): StepBuilderInterface
2620 {
27- $ this ->logger = $ logger ;
28-
2921 return $ this ;
3022 }
3123
3224 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
3325 {
34- $ this ->rejection = $ rejection ;
35-
3626 return $ this ;
3727 }
3828
3929 public function withState (Node \Expr $ state ): StepBuilderInterface
4030 {
41- $ this ->state = $ state ;
42-
4331 return $ this ;
4432 }
4533
Original file line number Diff line number Diff line change 99
1010final class AlternativeLookup implements StepBuilderInterface
1111{
12- private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1512 /** @var array<array-key, array{value: Node\Expr, type: string}> */
1613 private array $ parameters ;
1714 private ?Builder $ merge ;
1815
1916 public function __construct (private Node \Expr $ query )
2017 {
21- $ this ->logger = null ;
22- $ this ->rejection = null ;
23- $ this ->state = null ;
2418 $ this ->parameters = [];
2519 $ this ->merge = null ;
2620 }
2721
2822 public function withLogger (Node \Expr $ logger ): StepBuilderInterface
2923 {
30- $ this ->logger = $ logger ;
31-
3224 return $ this ;
3325 }
3426
3527 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
3628 {
37- $ this ->rejection = $ rejection ;
38-
3929 return $ this ;
4030 }
4131
4232 public function withState (Node \Expr $ state ): StepBuilderInterface
4333 {
44- $ this ->state = $ state ;
45-
4634 return $ this ;
4735 }
4836
@@ -362,7 +350,7 @@ class: new Node\Name('DateTimeImmutable'),
362350 }
363351 }
364352
365- private function compileParameterType (array $ parameter ): ? Node \Arg
353+ private function compileParameterType (array $ parameter ): Node \Arg
366354 {
367355 return match ($ parameter ["type " ]) {
368356 'integer ' => new Node \Arg (
Original file line number Diff line number Diff line change 1010final class ConditionalLoader implements StepBuilderInterface
1111{
1212 private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1513 /** @var array<array{Node\Expr, AlternativeLoader}> */
1614 private iterable $ alternatives ;
1715 /** @var array<int, InitializerQueries> */
@@ -23,8 +21,6 @@ public function __construct(
2321 private null |Node \Expr |Connection $ connection = null ,
2422 ) {
2523 $ this ->logger = null ;
26- $ this ->rejection = null ;
27- $ this ->state = null ;
2824 $ this ->alternatives = [];
2925 $ this ->beforeQueries = [];
3026 $ this ->afterQueries = [];
@@ -39,15 +35,11 @@ public function withLogger(Node\Expr $logger): StepBuilderInterface
3935
4036 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
4137 {
42- $ this ->rejection = $ rejection ;
43-
4438 return $ this ;
4539 }
4640
4741 public function withState (Node \Expr $ state ): StepBuilderInterface
4842 {
49- $ this ->state = $ state ;
50-
5143 return $ this ;
5244 }
5345
Original file line number Diff line number Diff line change 1010final class ConditionalLookup implements StepBuilderInterface
1111{
1212 private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1513 /** @var array<array{Node\Expr, AlternativeLoader}> */
1614 private iterable $ alternatives ;
1715 /** @var array<int, InitializerQueries> */
@@ -23,8 +21,6 @@ public function __construct(
2321 private null |Node \Expr |Connection $ connection = null
2422 ) {
2523 $ this ->logger = null ;
26- $ this ->rejection = null ;
27- $ this ->state = null ;
2824 $ this ->alternatives = [];
2925 $ this ->beforeQueries = [];
3026 $ this ->afterQueries = [];
@@ -39,15 +35,11 @@ public function withLogger(Node\Expr $logger): StepBuilderInterface
3935
4036 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
4137 {
42- $ this ->rejection = $ rejection ;
43-
4438 return $ this ;
4539 }
4640
4741 public function withState (Node \Expr $ state ): StepBuilderInterface
4842 {
49- $ this ->state = $ state ;
50-
5143 return $ this ;
5244 }
5345
Original file line number Diff line number Diff line change 88final class Extractor implements StepBuilderInterface
99{
1010 private ?Node \Expr $ logger ;
11- private ?Node \Expr $ rejection ;
12- private ?Node \Expr $ state ;
1311 /** @var array<int, InitializerQueries> */
1412 private array $ beforeQueries ;
1513 /** @var array<int, InitializerQueries> */
@@ -21,8 +19,6 @@ public function __construct(
2119 private null |Node \Expr |Connection $ connection = null ,
2220 ) {
2321 $ this ->logger = null ;
24- $ this ->rejection = null ;
25- $ this ->state = null ;
2622 $ this ->beforeQueries = [];
2723 $ this ->afterQueries = [];
2824 $ this ->parameters = [];
@@ -37,15 +33,11 @@ public function withLogger(Node\Expr $logger): StepBuilderInterface
3733
3834 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
3935 {
40- $ this ->rejection = $ rejection ;
41-
4236 return $ this ;
4337 }
4438
4539 public function withState (Node \Expr $ state ): StepBuilderInterface
4640 {
47- $ this ->state = $ state ;
48-
4941 return $ this ;
5042 }
5143
Original file line number Diff line number Diff line change 88final class Loader implements StepBuilderInterface
99{
1010 private ?Node \Expr $ logger ;
11- private ?Node \Expr $ rejection ;
12- private ?Node \Expr $ state ;
1311 /** @var array<int, InitializerQueries> */
1412 private array $ beforeQueries ;
1513 /** @var array<int, InitializerQueries> */
@@ -21,8 +19,6 @@ public function __construct(
2119 private null |Node \Expr |Connection $ connection = null ,
2220 ) {
2321 $ this ->logger = null ;
24- $ this ->rejection = null ;
25- $ this ->state = null ;
2622 $ this ->beforeQueries = [];
2723 $ this ->afterQueries = [];
2824 $ this ->parameters = [];
@@ -37,15 +33,11 @@ public function withLogger(Node\Expr $logger): StepBuilderInterface
3733
3834 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
3935 {
40- $ this ->rejection = $ rejection ;
41-
4236 return $ this ;
4337 }
4438
4539 public function withState (Node \Expr $ state ): StepBuilderInterface
4640 {
47- $ this ->state = $ state ;
48-
4941 return $ this ;
5042 }
5143
Original file line number Diff line number Diff line change 88final class Lookup implements StepBuilderInterface
99{
1010 private ?Node \Expr $ logger ;
11- private ?Node \Expr $ rejection ;
12- private ?Node \Expr $ state ;
1311 /** @var array<int, InitializerQueries> */
1412 private array $ beforeQueries ;
1513 /** @var array<int, InitializerQueries> */
@@ -20,8 +18,6 @@ public function __construct(
2018 private null |Node \Expr |Connection $ connection = null ,
2119 ) {
2220 $ this ->logger = null ;
23- $ this ->rejection = null ;
24- $ this ->state = null ;
2521 $ this ->beforeQueries = [];
2622 $ this ->afterQueries = [];
2723 }
@@ -35,15 +31,11 @@ public function withLogger(Node\Expr $logger): StepBuilderInterface
3531
3632 public function withRejection (Node \Expr $ rejection ): StepBuilderInterface
3733 {
38- $ this ->rejection = $ rejection ;
39-
4034 return $ this ;
4135 }
4236
4337 public function withState (Node \Expr $ state ): StepBuilderInterface
4438 {
45- $ this ->state = $ state ;
46-
4739 return $ this ;
4840 }
4941
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ class Extractor implements StepRepositoryInterface
1414
1515 public function __construct (private SQL \Builder \Extractor $ builder )
1616 {
17+ $ this ->files = [];
18+ $ this ->packages = [];
1719 }
1820
1921 public function withConnection (Connection $ connection ): self
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ class Loader implements StepRepositoryInterface
1414
1515 public function __construct (private SQL \Builder \Loader |SQL \Builder \ConditionalLoader $ builder )
1616 {
17+ $ this ->files = [];
18+ $ this ->packages = [];
1719 }
1820
1921 public function withConnection (Connection $ connection ): self
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ class Lookup implements StepRepositoryInterface
1414
1515 public function __construct (private SQL \Builder \Lookup |SQL \Builder \ConditionalLookup $ builder )
1616 {
17+ $ this ->files = [];
18+ $ this ->packages = [];
1719 }
1820
1921 public function withConnection (Connection $ connection ): self
You can’t perform that action at this time.
0 commit comments