@@ -6,8 +6,8 @@ |
||
6 | 6 | |
7 | 7 | interface IInterval |
8 | 8 | { |
9 | - final public const MIN_INTERVAL_MILLISECONDS = 10; // 10 milliseconds |
|
10 | - final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
9 | + final public const MIN_INTERVAL_MILLISECONDS = 10; // 10 milliseconds |
|
10 | + final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
11 | 11 | |
12 | 12 | public function toMicroseconds(): float; |
13 | 13 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | public function wrap(Closure $callback): Closure |
53 | 53 | { |
54 | 54 | return |
55 | - function (mixed ...$args) use ($callback): void { |
|
55 | + function(mixed ...$args) use ($callback): void { |
|
56 | 56 | $this->erase(); |
57 | 57 | $callback(...$args); |
58 | 58 | $this->render(); |
@@ -12,9 +12,9 @@ |
||
12 | 12 | use Closure; |
13 | 13 | |
14 | 14 | interface IDriver extends IObserver, |
15 | - ISubject, |
|
16 | - IRenderable, |
|
17 | - IHasInterval |
|
15 | + ISubject, |
|
16 | + IRenderable, |
|
17 | + IHasInterval |
|
18 | 18 | { |
19 | 19 | /** |
20 | 20 | * Adds spinner to the driver. |
@@ -169,33 +169,33 @@ discard block |
||
169 | 169 | function getDefinitions(): Traversable |
170 | 170 | { |
171 | 171 | yield from [ |
172 | - IResourceStream::class => static function (ContainerInterface $container): IResourceStream { |
|
172 | + IResourceStream::class => static function(ContainerInterface $container): IResourceStream { |
|
173 | 173 | return |
174 | 174 | new ResourceStream(STDERR); // FIXME (2023-10-11 14:49) [Alec Rabbit]: stub! |
175 | 175 | }, |
176 | - ISettingsProvider::class => static function (ContainerInterface $container): ISettingsProvider { |
|
176 | + ISettingsProvider::class => static function(ContainerInterface $container): ISettingsProvider { |
|
177 | 177 | return $container->get(ISettingsProviderFactory::class)->create(); |
178 | 178 | }, |
179 | - IConfigProvider::class => static function (ContainerInterface $container): IConfigProvider { |
|
179 | + IConfigProvider::class => static function(ContainerInterface $container): IConfigProvider { |
|
180 | 180 | return $container->get(IConfigProviderFactory::class)->create(); |
181 | 181 | }, |
182 | - ILoopProvider::class => static function (ContainerInterface $container): ILoopProvider { |
|
182 | + ILoopProvider::class => static function(ContainerInterface $container): ILoopProvider { |
|
183 | 183 | return $container->get(ILoopProviderFactory::class)->create(); |
184 | 184 | }, |
185 | - IDriverProvider::class => static function (ContainerInterface $container): IDriverProvider { |
|
185 | + IDriverProvider::class => static function(ContainerInterface $container): IDriverProvider { |
|
186 | 186 | return $container->get(IDriverProviderFactory::class)->create(); |
187 | 187 | }, |
188 | 188 | |
189 | - IDriver::class => static function (ContainerInterface $container): IDriver { |
|
189 | + IDriver::class => static function(ContainerInterface $container): IDriver { |
|
190 | 190 | return $container->get(IDriverFactory::class)->getDriver(); |
191 | 191 | }, |
192 | - IDriverLinker::class => static function (ContainerInterface $container): IDriverLinker { |
|
192 | + IDriverLinker::class => static function(ContainerInterface $container): IDriverLinker { |
|
193 | 193 | return $container->get(IDriverLinkerFactory::class)->create(); |
194 | 194 | }, |
195 | - IIntervalNormalizer::class => static function (ContainerInterface $container): IIntervalNormalizer { |
|
195 | + IIntervalNormalizer::class => static function(ContainerInterface $container): IIntervalNormalizer { |
|
196 | 196 | return $container->get(IIntervalNormalizerFactory::class)->create(); |
197 | 197 | }, |
198 | - ILoopCreatorClassProvider::class => static function (ContainerInterface $container): ILoopCreatorClassProvider { |
|
198 | + ILoopCreatorClassProvider::class => static function(ContainerInterface $container): ILoopCreatorClassProvider { |
|
199 | 199 | $creatorClass = $container->get(ILoopCreatorClassExtractor::class)->extract( |
200 | 200 | Probes::load(ILoopProbe::class) |
201 | 201 | ); |
@@ -222,28 +222,28 @@ discard block |
||
222 | 222 | function configs(): Traversable |
223 | 223 | { |
224 | 224 | yield from [ |
225 | - IConfig::class => static function (ContainerInterface $container): IConfig { |
|
225 | + IConfig::class => static function(ContainerInterface $container): IConfig { |
|
226 | 226 | return $container->get(IConfigProvider::class)->getConfig(); |
227 | 227 | }, |
228 | - IDriverConfig::class => static function (ContainerInterface $container): IDriverConfig { |
|
228 | + IDriverConfig::class => static function(ContainerInterface $container): IDriverConfig { |
|
229 | 229 | return $container->get(IConfig::class)->get(IDriverConfig::class); |
230 | 230 | }, |
231 | - IOutputConfig::class => static function (ContainerInterface $container): IOutputConfig { |
|
231 | + IOutputConfig::class => static function(ContainerInterface $container): IOutputConfig { |
|
232 | 232 | return $container->get(IConfig::class)->get(IOutputConfig::class); |
233 | 233 | }, |
234 | - ILoopConfig::class => static function (ContainerInterface $container): ILoopConfig { |
|
234 | + ILoopConfig::class => static function(ContainerInterface $container): ILoopConfig { |
|
235 | 235 | return $container->get(IConfig::class)->get(ILoopConfig::class); |
236 | 236 | }, |
237 | - IAuxConfig::class => static function (ContainerInterface $container): IAuxConfig { |
|
237 | + IAuxConfig::class => static function(ContainerInterface $container): IAuxConfig { |
|
238 | 238 | return $container->get(IConfig::class)->get(IAuxConfig::class); |
239 | 239 | }, |
240 | - IWidgetConfig::class => static function (ContainerInterface $container): IWidgetConfig { |
|
240 | + IWidgetConfig::class => static function(ContainerInterface $container): IWidgetConfig { |
|
241 | 241 | return $container->get(IConfig::class)->get(IWidgetConfig::class); |
242 | 242 | }, |
243 | - IRootWidgetConfig::class => static function (ContainerInterface $container): IRootWidgetConfig { |
|
243 | + IRootWidgetConfig::class => static function(ContainerInterface $container): IRootWidgetConfig { |
|
244 | 244 | return $container->get(IConfig::class)->get(IRootWidgetConfig::class); |
245 | 245 | }, |
246 | - RunMethodMode::class => static function (ContainerInterface $container): RunMethodMode { |
|
246 | + RunMethodMode::class => static function(ContainerInterface $container): RunMethodMode { |
|
247 | 247 | return $container->get(IAuxConfig::class)->getRunMethodMode(); |
248 | 248 | }, |
249 | 249 | ]; |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | IOutputConfigFactory::class => OutputConfigFactory::class, |
325 | 325 | IDriverConfigFactory::class => DriverConfigFactory::class, |
326 | 326 | |
327 | - ILoopFactory::class => static function (ContainerInterface $container): ILoopFactory { |
|
327 | + ILoopFactory::class => static function(ContainerInterface $container): ILoopFactory { |
|
328 | 328 | return |
329 | 329 | new LoopFactory( |
330 | 330 | loopCreator: (string)$container->get(ILoopCreatorClassProvider::class)->getCreatorClass(), |
@@ -339,19 +339,19 @@ discard block |
||
339 | 339 | function detectors(): Traversable |
340 | 340 | { |
341 | 341 | yield from [ |
342 | - ILoopSupportDetector::class => static function (ContainerInterface $container): LoopSupportDetector { |
|
342 | + ILoopSupportDetector::class => static function(ContainerInterface $container): LoopSupportDetector { |
|
343 | 343 | return |
344 | 344 | new LoopSupportDetector( |
345 | 345 | $container->get(ILoopCreatorClassProvider::class)->getCreatorClass(), |
346 | 346 | ); |
347 | 347 | }, |
348 | - ISignalProcessingSupportDetector::class => static function (): SignalProcessingSupportDetector { |
|
348 | + ISignalProcessingSupportDetector::class => static function(): SignalProcessingSupportDetector { |
|
349 | 349 | return |
350 | 350 | new SignalProcessingSupportDetector( |
351 | 351 | Probes::load(ISignalProcessingProbe::class) |
352 | 352 | ); |
353 | 353 | }, |
354 | - IColorSupportDetector::class => static function (): IColorSupportDetector { |
|
354 | + IColorSupportDetector::class => static function(): IColorSupportDetector { |
|
355 | 355 | return |
356 | 356 | new ColorSupportDetector( |
357 | 357 | Probes::load(IColorSupportProbe::class) |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | function substitutes(): Traversable |
367 | 367 | { |
368 | 368 | yield from [ |
369 | - IWidgetSettingsSolver::class => static function (): IWidgetSettingsSolver { |
|
369 | + IWidgetSettingsSolver::class => static function(): IWidgetSettingsSolver { |
|
370 | 370 | return new class implements IWidgetSettingsSolver { |
371 | 371 | public function solve(): IWidgetSettings |
372 | 372 | { |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | // } |
400 | 400 | // }; |
401 | 401 | // }, |
402 | - IRootWidgetConfigFactory::class => static function (): IRootWidgetConfigFactory { |
|
402 | + IRootWidgetConfigFactory::class => static function(): IRootWidgetConfigFactory { |
|
403 | 403 | return |
404 | 404 | new class implements IRootWidgetConfigFactory { |
405 | 405 | public function create( |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | } |
418 | 418 | }; |
419 | 419 | }, |
420 | - NormalizerMethodMode::class => static function (ContainerInterface $container): NormalizerMethodMode { |
|
420 | + NormalizerMethodMode::class => static function(ContainerInterface $container): NormalizerMethodMode { |
|
421 | 421 | return |
422 | 422 | NormalizerMethodMode::BALANCED; // FIXME (2023-09-29 13:57) [Alec Rabbit]: stub! |
423 | 423 | }, |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | return |
25 | 25 | new Container( |
26 | - spawnerCreatorCb: static function (ContainerInterface $container): IServiceSpawner { |
|
26 | + spawnerCreatorCb: static function(ContainerInterface $container): IServiceSpawner { |
|
27 | 27 | return |
28 | 28 | new ServiceSpawner($container); |
29 | 29 | }, |
@@ -9,7 +9,7 @@ |
||
9 | 9 | use AlecRabbit\Spinner\Contract\ISubject; |
10 | 10 | |
11 | 11 | interface IWidget extends ISubject, |
12 | - IHasInterval, |
|
13 | - IHasFrame |
|
12 | + IHasInterval, |
|
13 | + IHasFrame |
|
14 | 14 | { |
15 | 15 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | use AlecRabbit\Spinner\Contract\IObserver; |
8 | 8 | |
9 | 9 | interface IWidgetComposite extends IWidget, |
10 | - IObserver |
|
10 | + IObserver |
|
11 | 11 | { |
12 | 12 | public function add(IWidgetContext $context): IWidgetContext; |
13 | 13 |
@@ -9,8 +9,8 @@ |
||
9 | 9 | use AlecRabbit\Spinner\Contract\ISubject; |
10 | 10 | |
11 | 11 | interface IWidgetContext extends IObserver, |
12 | - ISubject, |
|
13 | - IHasNullableInterval |
|
12 | + ISubject, |
|
13 | + IHasNullableInterval |
|
14 | 14 | { |
15 | 15 | public function setWidget(?IWidget $widget): void; |
16 | 16 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | { |
39 | 39 | $this->options = |
40 | 40 | new PaletteOptions( |
41 | - interval: $this->options->getInterval() ?? 80, |
|
42 | - reversed: $this->options->getReversed(), |
|
41 | + interval : $this->options->getInterval() ?? 80, |
|
42 | + reversed : $this->options->getReversed(), |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | return parent::getOptions($mode); |