@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | Loop::onReadable( |
95 | 95 | STDIN, |
96 | 96 | /** @param resource $stream */ |
97 | - function (string $watcher_id, $stream) { |
|
97 | + function(string $watcher_id, $stream) { |
|
98 | 98 | $key = fread($stream, 1); |
99 | 99 | if ($key === 'q') { |
100 | 100 | Loop::cancel($watcher_id); |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | } |
103 | 103 | } |
104 | 104 | ); |
105 | - Loop::run(function () use ($dispatch_table, $searcher_context, $worker_pool, $formatter) { |
|
105 | + Loop::run(function() use ($dispatch_table, $searcher_context, $worker_pool, $formatter) { |
|
106 | 106 | $promises = []; |
107 | - $promises[] = call(function () use ($searcher_context, $dispatch_table) { |
|
107 | + $promises[] = call(function() use ($searcher_context, $dispatch_table) { |
|
108 | 108 | while (1) { |
109 | 109 | Log::debug('receiving pid List'); |
110 | 110 | $update_target_message = yield $searcher_context->receivePidList(); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | }); |
119 | 119 | foreach ($worker_pool->getWorkers() as $reader) { |
120 | 120 | $promises[] = call( |
121 | - function () use ($reader, $dispatch_table, $formatter) { |
|
121 | + function() use ($reader, $dispatch_table, $formatter) { |
|
122 | 122 | while (1) { |
123 | 123 | $result = yield $reader->receiveTraceOrDetachWorker(); |
124 | 124 | if ($result instanceof TraceMessage) { |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | Loop::onReadable( |
97 | 97 | STDIN, |
98 | 98 | /** @param resource $stream */ |
99 | - function (string $watcher_id, $stream) { |
|
99 | + function(string $watcher_id, $stream) { |
|
100 | 100 | $key = fread($stream, 1); |
101 | 101 | if ($key === 'q') { |
102 | 102 | Loop::cancel($watcher_id); |
@@ -104,9 +104,9 @@ discard block |
||
104 | 104 | } |
105 | 105 | } |
106 | 106 | ); |
107 | - Loop::run(function () use ($dispatch_table, $searcher_context, $worker_pool, $trace_output) { |
|
107 | + Loop::run(function() use ($dispatch_table, $searcher_context, $worker_pool, $trace_output) { |
|
108 | 108 | $promises = []; |
109 | - $promises[] = call(function () use ($searcher_context, $dispatch_table) { |
|
109 | + $promises[] = call(function() use ($searcher_context, $dispatch_table) { |
|
110 | 110 | while (1) { |
111 | 111 | Log::debug('receiving pid List'); |
112 | 112 | $update_target_message = yield $searcher_context->receivePidList(); |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | }); |
121 | 121 | foreach ($worker_pool->getWorkers() as $reader) { |
122 | 122 | $promises[] = call( |
123 | - function () use ($reader, $dispatch_table, $trace_output) { |
|
123 | + function() use ($reader, $dispatch_table, $trace_output) { |
|
124 | 124 | while (1) { |
125 | 125 | $result = yield $reader->receiveTraceOrDetachWorker(); |
126 | 126 | if ($result instanceof TraceMessage) { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | return [ |
46 | 46 | MemoryReaderInterface::class => autowire(MemoryReader::class), |
47 | - ZendTypeReader::class => function () { |
|
47 | + ZendTypeReader::class => function() { |
|
48 | 48 | return new ZendTypeReader(ZendTypeReader::V80); |
49 | 49 | }, |
50 | 50 | SymbolResolverCreatorInterface::class => autowire(Elf64SymbolResolverCreator::class), |
@@ -58,13 +58,13 @@ discard block |
||
58 | 58 | ProcessSearcherInterface::class => autowire(ProcessSearcher::class), |
59 | 59 | Config::class => fn () => Config::load(__DIR__ . '/config.php'), |
60 | 60 | TemplatePathResolverInterface::class => autowire(TemplatePathResolver::class), |
61 | - StateCollector::class => function (Container $container) { |
|
61 | + StateCollector::class => function(Container $container) { |
|
62 | 62 | $collectors = []; |
63 | 63 | $collectors[] = $container->make(ProcessStateCollector::class); |
64 | 64 | $collectors[] = $container->make(CallerStateCollector::class); |
65 | 65 | return new GroupedStateCollector(...$collectors); |
66 | 66 | }, |
67 | - LoggerInterface::class => function (Config $config) { |
|
67 | + LoggerInterface::class => function(Config $config) { |
|
68 | 68 | $logger = new Logger('default'); |
69 | 69 | $handler = new StreamHandler( |
70 | 70 | $config->get('log.path.default'), |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | $rows = []; |
56 | 56 | $align_right = new TableCellStyle(['align' => 'right']); |
57 | - $styled = fn (int|string $content, TableCellStyle $style): TableCell => |
|
57 | + $styled = fn (int | string $content, TableCellStyle $style): TableCell => |
|
58 | 58 | new TableCell( |
59 | 59 | (string)$content, |
60 | 60 | ['style' => $style] |
@@ -20,7 +20,7 @@ |
||
20 | 20 | class Cast |
21 | 21 | { |
22 | 22 | /** @param CPointer $cdata */ |
23 | - public static function castPointerToInt(CData &$cdata): int |
|
23 | + public static function castPointerToInt(CData & $cdata): int |
|
24 | 24 | { |
25 | 25 | /** @var CInteger $casted */ |
26 | 26 | $casted = \FFI::cast('long', $cdata); |
@@ -48,7 +48,7 @@ |
||
48 | 48 | ): Generator { |
49 | 49 | $trace_cache = new TraceCache(); |
50 | 50 | $loop = $this->reader_loop_provider->getMainLoop( |
51 | - function () use ( |
|
51 | + function() use ( |
|
52 | 52 | $get_trace_settings, |
53 | 53 | $target_process_descriptor, |
54 | 54 | $loop_settings, |
@@ -115,7 +115,7 @@ |
||
115 | 115 | |
116 | 116 | $trace_cache = new TraceCache(); |
117 | 117 | $this->loop_provider->getMainLoop( |
118 | - function () use ( |
|
118 | + function() use ( |
|
119 | 119 | $get_trace_settings, |
120 | 120 | $process_specifier, |
121 | 121 | $target_php_settings, |
@@ -19,7 +19,7 @@ |
||
19 | 19 | use Reli\Lib\Log\StateCollector\StateCollector; |
20 | 20 | use Psr\Log\LoggerInterface; |
21 | 21 | |
22 | -return function (Channel $channel) use ($argv): \Generator { |
|
22 | +return function(Channel $channel) use ($argv): \Generator { |
|
23 | 23 | /** |
24 | 24 | * @var class-string<WorkerEntryPointInterface> $entry_class |
25 | 25 | * @var class-string<MessageProtocolInterface> $protocol_class |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | namespace Reli\Lib\Defer; |
15 | 15 | |
16 | -function defer(?ScopeGuard &$scope_guard, callable $function): void |
|
16 | +function defer(?ScopeGuard & $scope_guard, callable $function): void |
|
17 | 17 | { |
18 | 18 | $scope_guard = new ScopeGuard( |
19 | 19 | \Closure::fromCallable($function), |