File tree Expand file tree Collapse file tree 9 files changed +7
-34
lines changed
Expand file tree Collapse file tree 9 files changed +7
-34
lines changed Original file line number Diff line number Diff line change 1010final class Extractor implements StepBuilderInterface
1111{
1212 private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1513
1614 public function __construct (
1715 private ?Node \Expr $ filePath ,
@@ -22,8 +20,6 @@ public function __construct(
2220 private bool $ safeMode = true ,
2321 ) {
2422 $ this ->logger = null ;
25- $ this ->rejection = null ;
26- $ this ->state = null ;
2723 }
2824
2925 public function withFilePath (Node \Expr $ filePath ): self
@@ -70,15 +66,11 @@ public function withLogger(Node\Expr $logger): self
7066
7167 public function withRejection (Node \Expr $ rejection ): self
7268 {
73- $ this ->rejection = $ rejection ;
74-
7569 return $ this ;
7670 }
7771
7872 public function withState (Node \Expr $ state ): self
7973 {
80- $ this ->state = $ state ;
81-
8274 return $ this ;
8375 }
8476
Original file line number Diff line number Diff line change 1010final class Loader implements StepBuilderInterface
1111{
1212 private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1513
1614 public function __construct (
1715 private ?Node \Expr $ filePath ,
@@ -22,8 +20,6 @@ public function __construct(
2220 private bool $ safeMode = true ,
2321 ) {
2422 $ this ->logger = null ;
25- $ this ->rejection = null ;
26- $ this ->state = null ;
2723 }
2824
2925 public function withFilePath (Node \Expr $ filePath ): self
@@ -70,15 +66,11 @@ public function withLogger(Node\Expr $logger): self
7066
7167 public function withRejection (Node \Expr $ rejection ): self
7268 {
73- $ this ->rejection = $ rejection ;
74-
7569 return $ this ;
7670 }
7771
7872 public function withState (Node \Expr $ state ): self
7973 {
80- $ this ->state = $ state ;
81-
8274 return $ this ;
8375 }
8476
Original file line number Diff line number Diff line change 1010final class MultipleFilesLoader implements StepBuilderInterface
1111{
1212 private ?Node \Expr $ logger ;
13- private ?Node \Expr $ rejection ;
14- private ?Node \Expr $ state ;
1513
1614 public function __construct (
1715 private ?Node \Expr $ filePath ,
@@ -23,8 +21,6 @@ public function __construct(
2321 private bool $ safeMode = true ,
2422 ) {
2523 $ this ->logger = null ;
26- $ this ->rejection = null ;
27- $ this ->state = null ;
2824 }
2925
3026 public function withFilePath (Node \Expr $ filePath ): self
@@ -34,13 +30,6 @@ public function withFilePath(Node\Expr $filePath): self
3430 return $ this ;
3531 }
3632
37- public function withPattern (Node \Expr $ pattern ): self
38- {
39- $ this ->pattern = $ pattern ;
40-
41- return $ this ;
42- }
43-
4433 public function withMaxLines (Node \Expr $ maxLines ): self
4534 {
4635 $ this ->maxLines = $ maxLines ;
@@ -85,15 +74,11 @@ public function withLogger(Node\Expr $logger): self
8574
8675 public function withRejection (Node \Expr $ rejection ): self
8776 {
88- $ this ->rejection = $ rejection ;
89-
9077 return $ this ;
9178 }
9279
9380 public function withState (Node \Expr $ state ): self
9481 {
95- $ this ->state = $ state ;
96-
9782 return $ this ;
9883 }
9984
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ public function getConfigTreeBuilder(): TreeBuilder
1515 $ loader = new Configuration \Loader ();
1616
1717 $ builder = new TreeBuilder ('csv ' );
18+
19+ /* @phpstan-ignore-next-line */
1820 $ builder ->getRootNode ()
1921 ->validate ()
2022 ->ifTrue (function (array $ value ) {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public function getConfigTreeBuilder(): TreeBuilder
1515 {
1616 $ builder = new TreeBuilder ('extractor ' );
1717
18+ /* @phpstan-ignore-next-line */
1819 $ builder ->getRootNode ()
1920 ->children ()
2021 ->scalarNode ('file_path ' )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ public function getConfigTreeBuilder(): TreeBuilder
1515 {
1616 $ builder = new TreeBuilder ('loader ' );
1717
18+ /* @phpstan-ignore-next-line */
1819 $ builder ->getRootNode ()
1920 ->children ()
2021 ->scalarNode ('file_path ' )
Original file line number Diff line number Diff line change 66use Kiboko \Plugin \Log ;
77use PhpParser \Node ;
88
9- final class ExtractorTest extends BuilderTestCase
9+ abstract class ExtractorTest extends BuilderTestCase
1010{
1111 public function testWithoutOptions (): void
1212 {
Original file line number Diff line number Diff line change 66use Kiboko \Plugin \Log ;
77use PhpParser \Node ;
88
9- final class LoaderTest extends BuilderTestCase
9+ abstract class LoaderTest extends BuilderTestCase
1010{
1111 public function testWithoutOptions (): void
1212 {
Original file line number Diff line number Diff line change 99use Vfs \FileSystem ;
1010use function Kiboko \Component \SatelliteToolbox \Configuration \compileExpression ;
1111
12- final class MultipleFilesLoaderTest extends BuilderTestCase
12+ abstract class MultipleFilesLoaderTest extends BuilderTestCase
1313{
1414 use PipelineAssertTrait;
1515
You can’t perform that action at this time.
0 commit comments