|
45 | 45 |
|
46 | 46 | $registry = DefinitionRegistry::getInstance(); |
47 | 47 |
|
48 | | -$registry->bind(new ServiceDefinition(ITimer::class, new MicrosecondTimer())); |
49 | | -$registry->bind(new ServiceDefinition(IDriverProviderFactory::class, BenchmarkingDriverProviderFactory::class)); |
50 | | -$registry->bind(new ServiceDefinition(IResultMaker::class, ResultMaker::class)); |
51 | | -$registry->bind(new ServiceDefinition(IBenchmarkResultsFactory::class, BenchmarkResultsFactory::class)); |
52 | | -$registry->bind(new ServiceDefinition(IBenchmarkingDriverFactory::class, BenchmarkingDriverFactory::class)); |
53 | | -$registry->bind(new ServiceDefinition(IBenchmarkingDriverBuilder::class, BenchmarkingDriverBuilder::class)); |
54 | | -$registry->bind(new ServiceDefinition(IBenchmarkFactory::class, BenchmarkFactory::class)); |
55 | | -$registry->bind(new ServiceDefinition(IMeasurementFactory::class, MeasurementFactory::class)); |
56 | | -$registry->bind(new ServiceDefinition(IStopwatchBuilder::class, StopwatchBuilder::class)); |
57 | | -$registry->bind(new ServiceDefinition(IStopwatchFactory::class, StopwatchFactory::class)); |
58 | | -$registry->bind(new ServiceDefinition(IReportPrinterBuilder::class, ReportPrinterBuilder::class)); |
59 | | -$registry->bind(new ServiceDefinition(IReportFormatter::class, ReportFormatter::class)); |
60 | | -$registry->bind(new ServiceDefinition(IDatetimeFormatter::class, DatetimeFormatter::class)); |
61 | | -$registry->bind(new ServiceDefinition(IResultFormatter::class, ResultFormatter::class)); |
62 | | -$registry->bind(new ServiceDefinition(IKeyFormatter::class, KeyFormatter::class)); |
63 | | - |
64 | 48 | $registry->bind( |
| 49 | + new ServiceDefinition(ITimer::class, new MicrosecondTimer()), |
| 50 | + new ServiceDefinition(IDriverProviderFactory::class, BenchmarkingDriverProviderFactory::class), |
| 51 | + new ServiceDefinition(IResultMaker::class, ResultMaker::class), |
| 52 | + new ServiceDefinition(IBenchmarkResultsFactory::class, BenchmarkResultsFactory::class), |
| 53 | + new ServiceDefinition(IBenchmarkingDriverFactory::class, BenchmarkingDriverFactory::class), |
| 54 | + new ServiceDefinition(IBenchmarkingDriverBuilder::class, BenchmarkingDriverBuilder::class), |
| 55 | + new ServiceDefinition(IBenchmarkFactory::class, BenchmarkFactory::class), |
| 56 | + new ServiceDefinition(IMeasurementFactory::class, MeasurementFactory::class), |
| 57 | + new ServiceDefinition(IStopwatchBuilder::class, StopwatchBuilder::class), |
| 58 | + new ServiceDefinition(IStopwatchFactory::class, StopwatchFactory::class), |
| 59 | + new ServiceDefinition(IReportPrinterBuilder::class, ReportPrinterBuilder::class), |
| 60 | + new ServiceDefinition(IReportFormatter::class, ReportFormatter::class), |
| 61 | + new ServiceDefinition(IDatetimeFormatter::class, DatetimeFormatter::class), |
| 62 | + new ServiceDefinition(IResultFormatter::class, ResultFormatter::class), |
| 63 | + new ServiceDefinition(IKeyFormatter::class, KeyFormatter::class), |
65 | 64 | new ServiceDefinition( |
66 | 65 | IReportPrinter::class, |
67 | 66 | static function (ContainerInterface $container): IReportPrinter { |
68 | 67 | return $container->get(IReportPrinterFactory::class)->create(); |
69 | 68 | } |
70 | 69 | ), |
71 | | -); |
72 | | - |
73 | | -$registry->bind( |
74 | 70 | new ServiceDefinition( |
75 | 71 | IReportPrinterFactory::class, |
76 | 72 | static function (ContainerInterface $container): IReportPrinterFactory { |
|
0 commit comments