@@ -13,7 +13,7 @@ |
||
| 13 | 13 | const BOOTSTRAPPED = true; |
| 14 | 14 | |
| 15 | 15 | /** @psalm-suppress InternalMethod */ |
| 16 | -Loop::set((static function (LoopInterface $loop): LoopInterface { |
|
| 16 | +Loop::set((static function(LoopInterface $loop): LoopInterface { |
|
| 17 | 17 | $lazyRegistry = new LazyRegistry(); |
| 18 | 18 | GlobalState::subscribe(static fn (Registry $registry) => $lazyRegistry->register($registry)); |
| 19 | 19 | |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | use function defined; |
| 8 | 8 | |
| 9 | 9 | // @codeCoverageIgnoreStart |
| 10 | -if (! defined('ReactInspector\EventLoop\BOOTSTRAPPED')) { |
|
| 11 | - require __DIR__ . '/bootstrap.php'; |
|
| 10 | +if (!defined('ReactInspector\EventLoop\BOOTSTRAPPED')) { |
|
| 11 | + require __DIR__.'/bootstrap.php'; |
|
| 12 | 12 | } |
| 13 | 13 | // @codeCoverageIgnoreEnd |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | $this->streams->gauge(new Label('kind', 'read'))->incr(); |
| 49 | 49 | /** @psalm-suppress MissingClosureParamType */ |
| 50 | - $this->loop->addReadStream($stream, function ($stream) use ($listener): void { |
|
| 50 | + $this->loop->addReadStream($stream, function($stream) use ($listener): void { |
|
| 51 | 51 | $this->streamTicks->counter(new Label('kind', 'read'))->incr(); |
| 52 | 52 | $listener($stream, $this); |
| 53 | 53 | }); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | $this->streams->gauge(new Label('kind', 'write'))->incr(); |
| 62 | 62 | /** @psalm-suppress MissingClosureParamType */ |
| 63 | - $this->loop->addWriteStream($stream, function ($stream) use ($listener): void { |
|
| 63 | + $this->loop->addWriteStream($stream, function($stream) use ($listener): void { |
|
| 64 | 64 | $this->streamTicks->counter(new Label('kind', 'write'))->incr(); |
| 65 | 65 | $listener($stream, $this); |
| 66 | 66 | }); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | public function addTimer($interval, $callback) |
| 92 | 92 | { |
| 93 | 93 | $loopTimer = null; |
| 94 | - $wrapper = function () use (&$loopTimer, $callback): void { |
|
| 94 | + $wrapper = function() use (&$loopTimer, $callback): void { |
|
| 95 | 95 | $this->timers->gauge(new Label('kind', 'one-off'))->dcr(); |
| 96 | 96 | $this->timerTicks->counter(new Label('kind', 'one-off'))->incr(); |
| 97 | 97 | $callback($loopTimer); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | */ |
| 117 | 117 | return $loopTimer = $this->loop->addPeriodicTimer( |
| 118 | 118 | $interval, |
| 119 | - function () use (&$loopTimer, $callback): void { |
|
| 119 | + function() use (&$loopTimer, $callback): void { |
|
| 120 | 120 | $this->timerTicks->counter(new Label('kind', 'periodic'))->incr(); |
| 121 | 121 | $callback($loopTimer); |
| 122 | 122 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $this->futureTicks->gauge()->incr(); |
| 142 | 142 | |
| 143 | - $this->loop->futureTick(function () use ($listener): void { |
|
| 143 | + $this->loop->futureTick(function() use ($listener): void { |
|
| 144 | 144 | $this->futureTicks->gauge()->dcr(); |
| 145 | 145 | $this->futureTickTicks->counter()->incr(); |
| 146 | 146 | $listener($this); |
@@ -171,12 +171,12 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | $listenerId = spl_object_id($listener); |
| 173 | 173 | /** @psalm-suppress MissingClosureParamType */ |
| 174 | - $wrapper = function ($signal) use ($listener): void { |
|
| 175 | - $this->signalTicks->counter(new Label('signal', (string)$signal))->incr(); |
|
| 174 | + $wrapper = function($signal) use ($listener): void { |
|
| 175 | + $this->signalTicks->counter(new Label('signal', (string) $signal))->incr(); |
|
| 176 | 176 | $listener($signal); |
| 177 | 177 | }; |
| 178 | 178 | $this->signalListeners[$signal][$listenerId] = $wrapper; |
| 179 | - $this->signals->gauge(new Label('signal', (string)$signal))->incr(); |
|
| 179 | + $this->signals->gauge(new Label('signal', (string) $signal))->incr(); |
|
| 180 | 180 | $this->loop->addSignal($signal, $wrapper); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | $listenerId = spl_object_id($listener); |
| 193 | 193 | $wrapper = $this->signalListeners[$signal][$listenerId]; |
| 194 | 194 | unset($this->signalListeners[$signal][$listenerId]); |
| 195 | - $this->signals->gauge(new Label('signal', (string)$signal))->dcr(); |
|
| 195 | + $this->signals->gauge(new Label('signal', (string) $signal))->dcr(); |
|
| 196 | 196 | $this->loop->removeSignal($signal, $wrapper); |
| 197 | 197 | } |
| 198 | 198 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | use ComposerUnused\ComposerUnused\Configuration\PatternFilter; |
| 8 | 8 | use Webmozart\Glob\Glob; |
| 9 | 9 | |
| 10 | -return static function (Configuration $config): Configuration { |
|
| 10 | +return static function(Configuration $config): Configuration { |
|
| 11 | 11 | return $config; |
| 12 | 12 | // ->addNamedFilter(NamedFilter::fromString('wyrihaximus/phpstan-rules-wrapper')); |
| 13 | 13 | }; |