@@ -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(), |
@@ -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; |
@@ -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 |
@@ -22,8 +22,8 @@ |
||
22 | 22 | bool $reversed = false |
23 | 23 | ) { |
24 | 24 | parent::__construct( |
25 | - interval: $interval ?? self::INTERVAL, |
|
26 | - reversed: $reversed |
|
25 | + interval : $interval ?? self::INTERVAL, |
|
26 | + reversed : $reversed |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 |
@@ -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 | }, |