@@ -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] |
@@ -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, |
@@ -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), |
@@ -104,7 +104,7 @@ |
||
| 104 | 104 | * @return CData|null |
| 105 | 105 | * @throws ParserException |
| 106 | 106 | */ |
| 107 | - public static function new($type, bool $owned = true, bool $persistent = false): ?CData {} |
|
| 107 | + public static function new($type, bool $owned = true, bool $persistent = false) : ?CData {} |
|
| 108 | 108 | |
| 109 | 109 | /** |
| 110 | 110 | * Manually removes previously created "not-owned" data structure. |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | EventLoop::onReadable( |
| 103 | 103 | STDIN, |
| 104 | 104 | /** @param resource $stream */ |
| 105 | - function (string $watcher_id, $stream) use ($cancellation) { |
|
| 105 | + function(string $watcher_id, $stream) use ($cancellation) { |
|
| 106 | 106 | $key = fread($stream, 1); |
| 107 | 107 | if ($key === 'q') { |
| 108 | 108 | EventLoop::cancel($watcher_id); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | ); |
| 113 | 113 | $futures = []; |
| 114 | - $futures[] = async(function () use ($searcher_context, $dispatch_table) { |
|
| 114 | + $futures[] = async(function() use ($searcher_context, $dispatch_table) { |
|
| 115 | 115 | while (1) { |
| 116 | 116 | Log::debug('receiving pid List'); |
| 117 | 117 | $update_target_message = $searcher_context->receivePidList(); |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | }); |
| 126 | 126 | foreach ($worker_pool->getWorkers() as $reader) { |
| 127 | 127 | $futures[] = async( |
| 128 | - function () use ($reader, $dispatch_table, $trace_output) { |
|
| 128 | + function() use ($reader, $dispatch_table, $trace_output) { |
|
| 129 | 129 | while (1) { |
| 130 | 130 | $result = $reader->receiveTraceOrDetachWorker(); |
| 131 | 131 | if ($result instanceof TraceMessage) { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | EventLoop::onReadable( |
| 101 | 101 | STDIN, |
| 102 | 102 | /** @param resource $stream */ |
| 103 | - function (string $watcher_id, $stream) use ($cancellation) { |
|
| 103 | + function(string $watcher_id, $stream) use ($cancellation) { |
|
| 104 | 104 | $key = fread($stream, 1); |
| 105 | 105 | if ($key === 'q') { |
| 106 | 106 | EventLoop::cancel($watcher_id); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | ); |
| 111 | 111 | $futures = []; |
| 112 | - $futures[] = async(function () use ($searcher_context, $dispatch_table) { |
|
| 112 | + $futures[] = async(function() use ($searcher_context, $dispatch_table) { |
|
| 113 | 113 | while (1) { |
| 114 | 114 | Log::debug('receiving pid List'); |
| 115 | 115 | $update_target_message = $searcher_context->receivePidList(); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | }); |
| 124 | 124 | foreach ($worker_pool->getWorkers() as $reader) { |
| 125 | 125 | $futures[] = async( |
| 126 | - function () use ($reader, $dispatch_table, $formatter) { |
|
| 126 | + function() use ($reader, $dispatch_table, $formatter) { |
|
| 127 | 127 | while (1) { |
| 128 | 128 | $result = $reader->receiveTraceOrDetachWorker(); |
| 129 | 129 | if ($result instanceof TraceMessage) { |
@@ -25,5 +25,5 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function sendAttach(AttachMessage $message): void; |
| 27 | 27 | |
| 28 | - public function receiveTraceOrDetachWorker(): TraceMessage|DetachWorkerMessage; |
|
| 28 | + public function receiveTraceOrDetachWorker(): TraceMessage | DetachWorkerMessage; |
|
| 29 | 29 | } |