File tree Expand file tree Collapse file tree 6 files changed +12
-25
lines changed
Expand file tree Collapse file tree 6 files changed +12
-25
lines changed Original file line number Diff line number Diff line change 1- <?php declare (strict_types=1 );
1+ <?php
2+
3+ declare (strict_types=1 );
24
35namespace Kiboko \Plugin \SQL \Builder ;
46
@@ -159,11 +161,12 @@ class: new Node\Name\FullyQualified('Kiboko\Component\Flow\SQL\ConditionalLoader
159161 ),
160162 $ this ->afterQueries ? new Node \Arg (
161163 value: $ this ->compileAfterQueries ()
162- ): new Node \Expr \Array_ (
164+ ) : new Node \Expr \Array_ (
163165 attributes: [
164166 'kind ' => Node \Expr \Array_::KIND_SHORT
165167 ],
166168 ),
169+ new Node \Arg (value: $ this ->logger ?? new Node \Expr \New_ (new Node \Name \FullyQualified ('Psr \\Log \\NullLogger ' ))),
167170 ],
168171 );
169172 }
Original file line number Diff line number Diff line change 1- <?php declare (strict_types=1 );
1+ <?php
2+
3+ declare (strict_types=1 );
24
35namespace Kiboko \Plugin \SQL \Builder ;
46
@@ -243,6 +245,7 @@ class: new Node\Name\FullyQualified('Psr\Log\NullLogger')
243245 new Node \Arg (
244246 value: $ this ->compileAfterQueries ()
245247 ),
248+ new Node \Arg (value: $ this ->logger ?? new Node \Expr \New_ (new Node \Name \FullyQualified ('Psr \\Log \\NullLogger ' ))),
246249 ],
247250 );
248251 }
Original file line number Diff line number Diff line change 1- <?php declare (strict_types=1 );
1+ <?php
2+
3+ declare (strict_types=1 );
24
35namespace Kiboko \Plugin \SQL \Builder ;
46
79
810final class Connection implements Builder
911{
10- private ?Node \Expr $ logger ;
11- private ?Node \Expr $ rejection ;
12- private ?Node \Expr $ state ;
1312 private ?bool $ persistentConnection ;
1413
1514 public function __construct (
1615 private Node \Expr $ dsn ,
1716 private ?Node \Expr $ username = null ,
1817 private ?Node \Expr $ password = null
1918 ) {
20- $ this ->logger = null ;
21- $ this ->rejection = null ;
22- $ this ->state = null ;
2319 $ this ->persistentConnection = null ;
2420 }
2521
Original file line number Diff line number Diff line change @@ -12,13 +12,8 @@ class Extractor implements StepRepositoryInterface
1212{
1313 use RepositoryTrait;
1414
15- private Node \Expr \Variable $ connectionVariable ;
16-
1715 public function __construct (private SQL \Builder \Extractor $ builder )
1816 {
19- $ this ->files = [];
20- $ this ->packages = [];
21- $ this ->connectionVariable = variable ('connection ' );
2217 }
2318
2419 public function withConnection (Connection $ connection ): self
Original file line number Diff line number Diff line change @@ -12,13 +12,8 @@ class Loader implements StepRepositoryInterface
1212{
1313 use RepositoryTrait;
1414
15- private Node \Expr \Variable $ connectionVariable ;
16-
1715 public function __construct (private SQL \Builder \Loader |SQL \Builder \ConditionalLoader $ builder )
1816 {
19- $ this ->files = [];
20- $ this ->packages = [];
21- $ this ->connectionVariable = variable ('connection ' );
2217 }
2318
2419 public function withConnection (Connection $ connection ): self
Original file line number Diff line number Diff line change @@ -12,13 +12,8 @@ class Lookup implements StepRepositoryInterface
1212{
1313 use RepositoryTrait;
1414
15- private Node \Expr \Variable $ connectionVariable ;
16-
1715 public function __construct (private SQL \Builder \Lookup |SQL \Builder \ConditionalLookup $ builder )
1816 {
19- $ this ->files = [];
20- $ this ->packages = [];
21- $ this ->connectionVariable = variable ('connection ' );
2217 }
2318
2419 public function withConnection (Connection $ connection ): self
You can’t perform that action at this time.
0 commit comments