1212use DragonCode \Benchmark \Services \ResultService ;
1313use DragonCode \Benchmark \Services \RunnerService ;
1414use DragonCode \Benchmark \Services \ViewService ;
15- use DragonCode \Benchmark \Transformers \ManagerTransformer ;
15+ use DragonCode \Benchmark \Transformers \ResultTransformer ;
1616use DragonCode \Benchmark \View \ProgressBarView ;
1717
1818use function abs ;
@@ -28,11 +28,11 @@ class Benchmark
2828
2929 public function __construct (
3030 protected RunnerService $ runner = new RunnerService ,
31- protected ManagerTransformer $ transformer = new ManagerTransformer ,
3231 protected ViewService $ view = new ViewService ,
3332 protected CallbacksService $ callbacks = new CallbacksService ,
3433 protected CollectorService $ collector = new CollectorService ,
3534 protected ResultService $ result = new ResultService ,
35+ protected ResultTransformer $ transformer = new ResultTransformer
3636 ) {}
3737
3838 public static function make (): static
@@ -109,10 +109,11 @@ public function toData(): array
109109
110110 public function toConsole (): void
111111 {
112- $ stats = $ this ->transformer ->forStats ($ this ->result );
113- $ winner = $ this ->transformer ->forWinners ($ stats );
112+ $ table = $ this ->transformer ->show (
113+ $ this ->toData ()
114+ );
114115
115- $ this ->view ->table ($ this -> transformer -> merge ( $ stats , $ winner ) );
116+ $ this ->view ->table ($ table );
116117 }
117118
118119 public function assert (): AssertService
0 commit comments