@@ -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 | } |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | */ |
| 74 | 74 | public function createHandler(IDriver $driver, ILoop $loop): Closure |
| 75 | 75 | { |
| 76 | - return static function () use ($driver, $loop): void { |
|
| 76 | + return static function() use ($driver, $loop): void { |
|
| 77 | 77 | $driver->interrupt(); |
| 78 | 78 | $loop->stop(); |
| 79 | 79 | }; |
@@ -45,13 +45,13 @@ |
||
| 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 | /** @psalm-suppress UnsupportedPropertyReferenceUsage */ |
| 53 | 53 | $stopped = &self::$stopped; |
| 54 | - register_shutdown_function(static function () use (&$hasRun, &$stopped): void { |
|
| 54 | + register_shutdown_function(static function() use (&$hasRun, &$stopped): void { |
|
| 55 | 55 | // Don't run if we're coming from a fatal error (uncaught exception). |
| 56 | 56 | if (self::error()) { // See [889ad594-ca28-4770-bb38-fd5bd8cb1777]. |
| 57 | 57 | return; |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | interface IInterval |
| 8 | 8 | { |
| 9 | 9 | final public const MIN_INTERVAL_MILLISECONDS = 10; |
| 10 | - final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
| 10 | + final public const MAX_INTERVAL_MILLISECONDS = 900000; // 15 minutes |
|
| 11 | 11 | |
| 12 | 12 | public function toMicroseconds(): float; |
| 13 | 13 | |
@@ -19,8 +19,8 @@ |
||
| 19 | 19 | { |
| 20 | 20 | $this->options = |
| 21 | 21 | new PaletteOptions( |
| 22 | - interval: $this->options->getInterval() ?? $this->getInterval($this->extractStylingMode($mode)), |
|
| 23 | - reversed: $this->options->getReversed(), |
|
| 22 | + interval : $this->options->getInterval() ?? $this->getInterval($this->extractStylingMode($mode)), |
|
| 23 | + reversed : $this->options->getReversed(), |
|
| 24 | 24 | ); |
| 25 | 25 | |
| 26 | 26 | return parent::getOptions($mode); |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | { |
| 36 | 36 | $this->options = |
| 37 | 37 | new PaletteOptions( |
| 38 | - interval: $this->options->getInterval() ?? $this->getInterval(), |
|
| 39 | - reversed: $this->options->getReversed(), |
|
| 38 | + interval : $this->options->getInterval() ?? $this->getInterval(), |
|
| 39 | + reversed : $this->options->getReversed(), |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | return parent::getOptions($mode); |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | |
| 49 | 49 | public function wrap(Closure $callback): Closure |
| 50 | 50 | { |
| 51 | - return function (mixed ...$args) use ($callback): void { |
|
| 51 | + return function(mixed ...$args) use ($callback): void { |
|
| 52 | 52 | $this->erase(); |
| 53 | 53 | $callback(...$args); |
| 54 | 54 | $this->render(); |
@@ -27,11 +27,11 @@ |
||
| 27 | 27 | ?IObserver $observer = null |
| 28 | 28 | ) { |
| 29 | 29 | parent::__construct( |
| 30 | - initialInterval: $initialInterval, |
|
| 31 | - driverMessages: $driverMessages, |
|
| 32 | - renderer: $renderer, |
|
| 33 | - deltaTimer: $deltaTimer, |
|
| 34 | - observer: $observer, |
|
| 30 | + initialInterval : $initialInterval, |
|
| 31 | + driverMessages : $driverMessages, |
|
| 32 | + renderer : $renderer, |
|
| 33 | + deltaTimer : $deltaTimer, |
|
| 34 | + observer : $observer, |
|
| 35 | 35 | ); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -232,55 +232,55 @@ discard block |
||
| 232 | 232 | ), |
| 233 | 233 | new ServiceDefinition( |
| 234 | 234 | IWritableStream::class, |
| 235 | - static function (IContainer $container): IWritableStream { |
|
| 235 | + static function(IContainer $container): IWritableStream { |
|
| 236 | 236 | return $container->get(IResourceStreamFactory::class)->create(); |
| 237 | 237 | }, |
| 238 | 238 | IServiceDefinition::SINGLETON, |
| 239 | 239 | ), |
| 240 | 240 | new ServiceDefinition( |
| 241 | 241 | ISettingsProvider::class, |
| 242 | - static function (IContainer $container): ISettingsProvider { |
|
| 242 | + static function(IContainer $container): ISettingsProvider { |
|
| 243 | 243 | return $container->get(ISettingsProviderFactory::class)->create(); |
| 244 | 244 | }, |
| 245 | 245 | IServiceDefinition::SINGLETON, |
| 246 | 246 | ), |
| 247 | 247 | new ServiceDefinition( |
| 248 | 248 | ILoopProvider::class, |
| 249 | - static function (IContainer $container): ILoopProvider { |
|
| 249 | + static function(IContainer $container): ILoopProvider { |
|
| 250 | 250 | return $container->get(ILoopProviderFactory::class)->create(); |
| 251 | 251 | }, |
| 252 | 252 | IServiceDefinition::SINGLETON, |
| 253 | 253 | ), |
| 254 | 254 | new ServiceDefinition( |
| 255 | 255 | IDriverProvider::class, |
| 256 | - static function (IContainer $container): IDriverProvider { |
|
| 256 | + static function(IContainer $container): IDriverProvider { |
|
| 257 | 257 | return $container->get(IDriverProviderFactory::class)->create(); |
| 258 | 258 | }, |
| 259 | 259 | IServiceDefinition::SINGLETON, |
| 260 | 260 | ), |
| 261 | 261 | new ServiceDefinition( |
| 262 | 262 | IDriverLinker::class, |
| 263 | - static function (IContainer $container): IDriverLinker { |
|
| 263 | + static function(IContainer $container): IDriverLinker { |
|
| 264 | 264 | return $container->get(IDriverLinkerFactory::class)->create(); |
| 265 | 265 | }, |
| 266 | 266 | IServiceDefinition::SINGLETON, |
| 267 | 267 | ), |
| 268 | 268 | new ServiceDefinition( |
| 269 | 269 | ISequenceStateWriter::class, |
| 270 | - static function (IContainer $container): ISequenceStateWriter { |
|
| 270 | + static function(IContainer $container): ISequenceStateWriter { |
|
| 271 | 271 | return $container->get(ISequenceStateWriterFactory::class)->create(); |
| 272 | 272 | }, |
| 273 | 273 | IServiceDefinition::SINGLETON, |
| 274 | 274 | ), |
| 275 | 275 | new ServiceDefinition( |
| 276 | 276 | IDeltaTimer::class, |
| 277 | - static function (IContainer $container): IDeltaTimer { |
|
| 277 | + static function(IContainer $container): IDeltaTimer { |
|
| 278 | 278 | return $container->get(IDeltaTimerFactory::class)->create(); |
| 279 | 279 | }, |
| 280 | 280 | IServiceDefinition::SINGLETON, |
| 281 | 281 | ), |
| 282 | 282 | IRenderer::class => Renderer::class, |
| 283 | - NormalizerMode::class => static function (IContainer $container): NormalizerMode { |
|
| 283 | + NormalizerMode::class => static function(IContainer $container): NormalizerMode { |
|
| 284 | 284 | return $container->get(INormalizerConfig::class)->getNormalizerMode(); |
| 285 | 285 | }, |
| 286 | 286 | INowTimer::class => new class() implements INowTimer { |
@@ -292,15 +292,15 @@ discard block |
||
| 292 | 292 | |
| 293 | 293 | IOutput::class => Output::class, |
| 294 | 294 | IDriverSetup::class => DriverSetup::class, |
| 295 | - ISignalHandlingSetup::class => static function (IContainer $container): ISignalHandlingSetup { |
|
| 295 | + ISignalHandlingSetup::class => static function(IContainer $container): ISignalHandlingSetup { |
|
| 296 | 296 | return $container->get(ISignalHandlingSetupFactory::class)->create(); |
| 297 | 297 | }, |
| 298 | 298 | |
| 299 | 299 | IIntervalComparator::class => IntervalComparator::class, |
| 300 | - IIntervalNormalizer::class => static function (IContainer $container): IIntervalNormalizer { |
|
| 300 | + IIntervalNormalizer::class => static function(IContainer $container): IIntervalNormalizer { |
|
| 301 | 301 | return $container->get(IIntervalNormalizerFactory::class)->create(); |
| 302 | 302 | }, |
| 303 | - ILoopCreatorClassProvider::class => static function (IContainer $container): ILoopCreatorClassProvider { |
|
| 303 | + ILoopCreatorClassProvider::class => static function(IContainer $container): ILoopCreatorClassProvider { |
|
| 304 | 304 | $creatorClass = |
| 305 | 305 | $container->get(ILoopCreatorClassExtractor::class) |
| 306 | 306 | ->extract( |
@@ -326,34 +326,34 @@ discard block |
||
| 326 | 326 | function configs(): Traversable |
| 327 | 327 | { |
| 328 | 328 | yield from [ |
| 329 | - IDriverConfig::class => static function (IContainer $container): IDriverConfig { |
|
| 329 | + IDriverConfig::class => static function(IContainer $container): IDriverConfig { |
|
| 330 | 330 | return $container->get(IDriverConfigFactory::class)->create(); |
| 331 | 331 | }, |
| 332 | - ILinkerConfig::class => static function (IContainer $container): ILinkerConfig { |
|
| 332 | + ILinkerConfig::class => static function(IContainer $container): ILinkerConfig { |
|
| 333 | 333 | return $container->get(ILinkerConfigFactory::class)->create(); |
| 334 | 334 | }, |
| 335 | - IOutputConfig::class => static function (IContainer $container): IOutputConfig { |
|
| 335 | + IOutputConfig::class => static function(IContainer $container): IOutputConfig { |
|
| 336 | 336 | return $container->get(IOutputConfigFactory::class)->create(); |
| 337 | 337 | }, |
| 338 | - ILoopConfig::class => static function (IContainer $container): ILoopConfig { |
|
| 338 | + ILoopConfig::class => static function(IContainer $container): ILoopConfig { |
|
| 339 | 339 | return $container->get(ILoopConfigFactory::class)->create(); |
| 340 | 340 | }, |
| 341 | - INormalizerConfig::class => static function (IContainer $container): INormalizerConfig { |
|
| 341 | + INormalizerConfig::class => static function(IContainer $container): INormalizerConfig { |
|
| 342 | 342 | return $container->get(INormalizerConfigFactory::class)->create(); |
| 343 | 343 | }, |
| 344 | - IGeneralConfig::class => static function (IContainer $container): IGeneralConfig { |
|
| 344 | + IGeneralConfig::class => static function(IContainer $container): IGeneralConfig { |
|
| 345 | 345 | return $container->get(IGeneralConfigFactory::class)->create(); |
| 346 | 346 | }, |
| 347 | - IWidgetConfig::class => static function (IContainer $container): IWidgetConfig { |
|
| 347 | + IWidgetConfig::class => static function(IContainer $container): IWidgetConfig { |
|
| 348 | 348 | return $container->get(IInitialWidgetConfigFactory::class)->create(); |
| 349 | 349 | }, |
| 350 | - IRootWidgetConfig::class => static function (IContainer $container): IRootWidgetConfig { |
|
| 350 | + IRootWidgetConfig::class => static function(IContainer $container): IRootWidgetConfig { |
|
| 351 | 351 | return $container->get(IInitialRootWidgetConfigFactory::class)->create(); |
| 352 | 352 | }, |
| 353 | - RunMethodMode::class => static function (IContainer $container): RunMethodMode { |
|
| 353 | + RunMethodMode::class => static function(IContainer $container): RunMethodMode { |
|
| 354 | 354 | return $container->get(IGeneralConfig::class)->getRunMethodMode(); |
| 355 | 355 | }, |
| 356 | - IRevolverConfig::class => static function (IContainer $container): IRevolverConfig { |
|
| 356 | + IRevolverConfig::class => static function(IContainer $container): IRevolverConfig { |
|
| 357 | 357 | return $container->get(IRevolverConfigFactory::class)->create(); |
| 358 | 358 | }, |
| 359 | 359 | IInitializationResolver::class => InitializationResolver::class, |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | ILinkerModeDetector::class => LinkerModeDetector::class, |
| 364 | 364 | IDriverModeDetector::class => DriverModeDetector::class, |
| 365 | 365 | IInitializationModeDetector::class => InitializationModeDetector::class, |
| 366 | - IDriverMessages::class => static function (IContainer $container): IDriverMessages { |
|
| 366 | + IDriverMessages::class => static function(IContainer $container): IDriverMessages { |
|
| 367 | 367 | return $container->get(IDriverConfig::class)->getDriverMessages(); |
| 368 | 368 | }, |
| 369 | 369 | ]; |
@@ -465,17 +465,17 @@ discard block |
||
| 465 | 465 | function detectors(): Traversable |
| 466 | 466 | { |
| 467 | 467 | yield from [ |
| 468 | - ILoopSupportDetector::class => static function (IContainer $container): LoopSupportDetector { |
|
| 468 | + ILoopSupportDetector::class => static function(IContainer $container): LoopSupportDetector { |
|
| 469 | 469 | return new LoopSupportDetector( |
| 470 | 470 | $container->get(ILoopCreatorClassProvider::class)->getCreatorClass(), |
| 471 | 471 | ); |
| 472 | 472 | }, |
| 473 | - ISignalHandlingSupportDetector::class => static function (): SignalHandlingSupportDetector { |
|
| 473 | + ISignalHandlingSupportDetector::class => static function(): SignalHandlingSupportDetector { |
|
| 474 | 474 | return new SignalHandlingSupportDetector( |
| 475 | 475 | Probes::load(ISignalHandlingProbe::class) |
| 476 | 476 | ); |
| 477 | 477 | }, |
| 478 | - IStylingMethodDetector::class => static function (): IStylingMethodDetector { |
|
| 478 | + IStylingMethodDetector::class => static function(): IStylingMethodDetector { |
|
| 479 | 479 | return new StylingMethodDetector( |
| 480 | 480 | Probes::load(IStylingMethodProbe::class) |
| 481 | 481 | ); |