11<?php declare (strict_types=1 );
22
3- namespace Kiboko \Component \Runtime \PipelineConsoleRuntime ;
3+ namespace Kiboko \Component \Runtime \Pipeline ;
44
5+ use Kiboko \Component \State ;
56use Kiboko \Contract \Pipeline \ExtractorInterface ;
67use Kiboko \Contract \Pipeline \TransformerInterface ;
78use Kiboko \Contract \Pipeline \LoaderInterface ;
1213
1314final class PipelineConsoleRuntime implements PipelineRuntimeInterface
1415{
15- private StateOutput \Pipeline $ state ;
16+ private State \ StateOutput \Pipeline $ state ;
1617
1718 public function __construct (
1819 ConsoleOutput $ output ,
1920 private PipelineInterface $ pipeline ,
20- ?StateOutput \Pipeline $ state = null
21+ ?State \ StateOutput \Pipeline $ state = null
2122 ) {
22- $ this ->state = $ state ?? new StateOutput \Pipeline ($ output , 'A ' , 'Pipeline ' );
23+ $ this ->state = $ state ?? new State \ StateOutput \Pipeline ($ output , 'A ' , 'Pipeline ' );
2324 }
2425
2526 public function extract (
2627 ExtractorInterface $ extractor ,
2728 RejectionInterface $ rejection ,
2829 StateInterface $ state ,
2930 ): self {
30- $ this ->pipeline ->extract ($ extractor , $ rejection , $ state = new MemoryState ($ state ));
31+ $ this ->pipeline ->extract ($ extractor , $ rejection , $ state = new State \ MemoryState ($ state ));
3132
3233 $ this ->state ->withStep ('extractor ' )
3334 ->addMetric ('read ' , $ state ->observeAccept ())
@@ -42,7 +43,7 @@ public function transform(
4243 RejectionInterface $ rejection ,
4344 StateInterface $ state ,
4445 ): self {
45- $ this ->pipeline ->transform ($ transformer , $ rejection , $ state = new MemoryState ($ state ));
46+ $ this ->pipeline ->transform ($ transformer , $ rejection , $ state = new State \ MemoryState ($ state ));
4647
4748 $ this ->state ->withStep ('transformer ' )
4849 ->addMetric ('read ' , $ state ->observeAccept ())
@@ -57,7 +58,7 @@ public function load(
5758 RejectionInterface $ rejection ,
5859 StateInterface $ state ,
5960 ): self {
60- $ this ->pipeline ->load ($ loader , $ rejection , $ state = new MemoryState ($ state ));
61+ $ this ->pipeline ->load ($ loader , $ rejection , $ state = new State \ MemoryState ($ state ));
6162
6263 $ this ->state ->withStep ('loader ' )
6364 ->addMetric ('read ' , $ state ->observeAccept ())
0 commit comments