@@ -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(); |
@@ -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 | }, |
@@ -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); |
@@ -18,6 +18,6 @@ |
||
18 | 18 | |
19 | 19 | return (bool)(($error['type'] ?? 0) |
20 | 20 | & |
21 | - (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR)); |
|
21 | + (E_ERROR|E_CORE_ERROR|E_COMPILE_ERROR|E_USER_ERROR|E_RECOVERABLE_ERROR)); |
|
22 | 22 | } |
23 | 23 | } |
@@ -45,12 +45,12 @@ |
||
45 | 45 | // Automatically run loop at the end of script, unless already started or stopped explicitly. |
46 | 46 | // @codeCoverageIgnoreStart |
47 | 47 | $hasRun = false; |
48 | - EventLoop::defer(static function () use (&$hasRun): void { |
|
48 | + EventLoop::defer(static function() use (&$hasRun): void { |
|
49 | 49 | $hasRun = true; |
50 | 50 | }); |
51 | 51 | |
52 | 52 | $stopped = &self::$stopped; |
53 | - register_shutdown_function(static function () use (&$hasRun, &$stopped): void { |
|
53 | + register_shutdown_function(static function() use (&$hasRun, &$stopped): void { |
|
54 | 54 | // Don't run if we're coming from a fatal error (uncaught exception). |
55 | 55 | if (self::error()) { |
56 | 56 | return; |