@@ -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 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | $definitions->bind( |
| 17 | 17 | ILoopProbeFactory::class, |
| 18 | - static function (): ILoopProbeFactory { |
|
| 18 | + static function(): ILoopProbeFactory { |
|
| 19 | 19 | return new LoopProbeFactory(probes()); |
| 20 | 20 | }, |
| 21 | 21 | ); |
@@ -47,12 +47,12 @@ |
||
| 47 | 47 | // Automatically run loop at end of program, unless already started or stopped explicitly. |
| 48 | 48 | // @codeCoverageIgnoreStart |
| 49 | 49 | $hasRun = false; |
| 50 | - EventLoop::defer(static function () use (&$hasRun): void { |
|
| 50 | + EventLoop::defer(static function() use (&$hasRun): void { |
|
| 51 | 51 | $hasRun = true; |
| 52 | 52 | }); |
| 53 | 53 | |
| 54 | 54 | $stopped = &self::$stopped; |
| 55 | - register_shutdown_function(static function () use (&$hasRun, &$stopped): void { |
|
| 55 | + register_shutdown_function(static function() use (&$hasRun, &$stopped): void { |
|
| 56 | 56 | // Don't run if we're coming from a fatal error (uncaught exception). |
| 57 | 57 | if (self::error()) { |
| 58 | 58 | return; |
@@ -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(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | { |
| 36 | 36 | return |
| 37 | 37 | new Container( |
| 38 | - spawnerCreatorCb: static function (ContainerInterface $container): IServiceSpawner { |
|
| 38 | + spawnerCreatorCb: static function(ContainerInterface $container): IServiceSpawner { |
|
| 39 | 39 | return new ServiceSpawner($container); |
| 40 | 40 | }, |
| 41 | 41 | definitions: $this->registry->getDefinitions(), |
@@ -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. |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | return (bool)(($error['type'] ?? 0) |
| 21 | 21 | & |
| 22 | - (E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR)); |
|
| 22 | + (E_ERROR|E_CORE_ERROR|E_COMPILE_ERROR|E_USER_ERROR|E_RECOVERABLE_ERROR)); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | abstract public function onSignal(int $signal, Closure $closure): void; |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | use AlecRabbit\Spinner\Core\Widget\Contract\IWidgetContext; |
| 14 | 14 | |
| 15 | 15 | interface ISpinner extends IObserver, |
| 16 | - ISubject, |
|
| 17 | - IHasInterval, |
|
| 18 | - IHasFrame |
|
| 16 | + ISubject, |
|
| 17 | + IHasInterval, |
|
| 18 | + IHasFrame |
|
| 19 | 19 | { |
| 20 | 20 | public function add(IWidget $element): IWidgetContext; |
| 21 | 21 | |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | public function __construct(?int $interval = null, bool $reversed = false) |
| 17 | 17 | { |
| 18 | 18 | parent::__construct( |
| 19 | - interval: $interval, |
|
| 20 | - reversed: $reversed, |
|
| 19 | + interval : $interval, |
|
| 20 | + reversed : $reversed, |
|
| 21 | 21 | ); |
| 22 | 22 | } |
| 23 | 23 | |