@@ -10,10 +10,10 @@ |
||
| 10 | 10 | use AlecRabbit\Spinner\Contract\ISubject; |
| 11 | 11 | |
| 12 | 12 | interface IWidget extends IObserver, |
| 13 | - ISubject, |
|
| 14 | - IHasInterval, |
|
| 15 | - IHasFrame, |
|
| 16 | - IHasWidgetContext |
|
| 13 | + ISubject, |
|
| 14 | + IHasInterval, |
|
| 15 | + IHasFrame, |
|
| 16 | + IHasWidgetContext |
|
| 17 | 17 | { |
| 18 | 18 | public function add(IWidget $widget): IWidgetContext; |
| 19 | 19 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | { |
| 48 | 48 | yield from [ |
| 49 | 49 | // @codeCoverageIgnoreStart |
| 50 | - SIGINT => function () use ($driver): void { |
|
| 50 | + SIGINT => function() use ($driver): void { |
|
| 51 | 51 | $driver->interrupt(PHP_EOL . 'SIGINT' . PHP_EOL); // todo: test |
| 52 | 52 | $this->loop->stop(); |
| 53 | 53 | }, |
@@ -150,22 +150,22 @@ discard block |
||
| 150 | 150 | IWidgetSettingsFactory::class => WidgetSettingsFactory::class, |
| 151 | 151 | IWidthMeasurerFactory::class => WidthMeasurerFactory::class, |
| 152 | 152 | |
| 153 | - IDriver::class => static function (ContainerInterface $container): IDriver { |
|
| 153 | + IDriver::class => static function(ContainerInterface $container): IDriver { |
|
| 154 | 154 | return $container->get(IDriverFactory::class)->getDriver(); |
| 155 | 155 | }, |
| 156 | - IDriverLinker::class => static function (ContainerInterface $container): IDriverLinker { |
|
| 156 | + IDriverLinker::class => static function(ContainerInterface $container): IDriverLinker { |
|
| 157 | 157 | return $container->get(IDriverLinkerFactory::class)->getDriverLinker(); |
| 158 | 158 | }, |
| 159 | - IDriverSettings::class => static function (ContainerInterface $container): IDriverSettings { |
|
| 159 | + IDriverSettings::class => static function(ContainerInterface $container): IDriverSettings { |
|
| 160 | 160 | return $container->get(ISettingsProvider::class)->getDriverSettings(); |
| 161 | 161 | }, |
| 162 | - IIntervalNormalizer::class => static function (ContainerInterface $container): IIntervalNormalizer { |
|
| 162 | + IIntervalNormalizer::class => static function(ContainerInterface $container): IIntervalNormalizer { |
|
| 163 | 163 | return $container->get(IIntervalNormalizerFactory::class)->create(); |
| 164 | 164 | }, |
| 165 | - ILoop::class => static function (ContainerInterface $container): ILoop { |
|
| 165 | + ILoop::class => static function(ContainerInterface $container): ILoop { |
|
| 166 | 166 | return $container->get(ILoopFactory::class)->getLoop(); |
| 167 | 167 | }, |
| 168 | - ILoopProbeFactory::class => static function (): never { |
|
| 168 | + ILoopProbeFactory::class => static function(): never { |
|
| 169 | 169 | throw new DomainException( |
| 170 | 170 | sprintf( |
| 171 | 171 | 'Service for id [%s] is not available in this context.', |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | ) |
| 174 | 174 | ); |
| 175 | 175 | }, |
| 176 | - ILoopProbe::class => static function (ContainerInterface $container): ILoopProbe { |
|
| 176 | + ILoopProbe::class => static function(ContainerInterface $container): ILoopProbe { |
|
| 177 | 177 | return $container->get(ILoopProbeFactory::class)->getProbe(); |
| 178 | 178 | }, |
| 179 | - ILoopSettingsFactory::class => static function (ContainerInterface $container): ILoopSettingsFactory { |
|
| 179 | + ILoopSettingsFactory::class => static function(ContainerInterface $container): ILoopSettingsFactory { |
|
| 180 | 180 | $loopProbe = null; |
| 181 | 181 | $signalProcessingProbe = null; |
| 182 | 182 | try { |
@@ -190,45 +190,45 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | }, |
| 192 | 192 | |
| 193 | - IResourceStream::class => static function (ContainerInterface $container): IResourceStream { |
|
| 193 | + IResourceStream::class => static function(ContainerInterface $container): IResourceStream { |
|
| 194 | 194 | /** @var ISettingsProvider $provider */ |
| 195 | 195 | $provider = $container->get(ISettingsProvider::class); |
| 196 | 196 | return new ResourceStream($provider->getTerminalSettings()->getOutputStream()); |
| 197 | 197 | }, |
| 198 | 198 | |
| 199 | - ISettingsProvider::class => static function (ContainerInterface $container): ISettingsProvider { |
|
| 199 | + ISettingsProvider::class => static function(ContainerInterface $container): ISettingsProvider { |
|
| 200 | 200 | return $container->get(ISettingsProviderBuilder::class)->build(); |
| 201 | 201 | }, |
| 202 | - ISignalProcessingProbe::class => static function (ContainerInterface $container): ISignalProcessingProbe { |
|
| 202 | + ISignalProcessingProbe::class => static function(ContainerInterface $container): ISignalProcessingProbe { |
|
| 203 | 203 | return $container->get(ISignalProcessingProbeFactory::class)->getProbe(); |
| 204 | 204 | }, |
| 205 | 205 | ISignalProcessingProbeFactory::class => SignalProcessingProbeFactory::class, |
| 206 | 206 | |
| 207 | - ITerminalProbeFactory::class => static function (): ITerminalProbeFactory { |
|
| 207 | + ITerminalProbeFactory::class => static function(): ITerminalProbeFactory { |
|
| 208 | 208 | return new TerminalProbeFactory( |
| 209 | 209 | new ArrayObject([ |
| 210 | 210 | NativeTerminalProbe::class, |
| 211 | 211 | ]), |
| 212 | 212 | ); |
| 213 | 213 | }, |
| 214 | - ITerminalSettingsFactory::class => static function (ContainerInterface $container |
|
| 214 | + ITerminalSettingsFactory::class => static function(ContainerInterface $container |
|
| 215 | 215 | ): ITerminalSettingsFactory { |
| 216 | 216 | $terminalProbe = $container->get(ITerminalProbeFactory::class)->getProbe(); |
| 217 | 217 | |
| 218 | 218 | return new TerminalSettingsFactory($terminalProbe); |
| 219 | 219 | }, |
| 220 | 220 | |
| 221 | - IWidthMeasurer::class => static function (ContainerInterface $container): IWidthMeasurer { |
|
| 221 | + IWidthMeasurer::class => static function(ContainerInterface $container): IWidthMeasurer { |
|
| 222 | 222 | return $container->get(IWidthMeasurerFactory::class)->create(); |
| 223 | 223 | }, |
| 224 | 224 | |
| 225 | - OptionNormalizerMode::class => static function (ContainerInterface $container): OptionNormalizerMode { |
|
| 225 | + OptionNormalizerMode::class => static function(ContainerInterface $container): OptionNormalizerMode { |
|
| 226 | 226 | return $container->get(ISettingsProvider::class)->getAuxSettings()->getOptionNormalizerMode(); |
| 227 | 227 | }, |
| 228 | - OptionCursor::class => static function (ContainerInterface $container): OptionCursor { |
|
| 228 | + OptionCursor::class => static function(ContainerInterface $container): OptionCursor { |
|
| 229 | 229 | return $container->get(ISettingsProvider::class)->getTerminalSettings()->getOptionCursor(); |
| 230 | 230 | }, |
| 231 | - OptionStyleMode::class => static function (ContainerInterface $container): OptionStyleMode { |
|
| 231 | + OptionStyleMode::class => static function(ContainerInterface $container): OptionStyleMode { |
|
| 232 | 232 | return $container->get(ISettingsProvider::class)->getTerminalSettings()->getOptionStyleMode(); |
| 233 | 233 | }, |
| 234 | 234 | ]; |