@@ -16,5 +16,5 @@ |
||
| 16 | 16 | |
| 17 | 17 | /** @var CallTrace $call_trace */ |
| 18 | 18 | |
| 19 | -echo CompatCallTraceFormatter::getInstance()->format($call_trace) , "\n"; |
|
| 19 | +echo CompatCallTraceFormatter::getInstance()->format($call_trace), "\n"; |
|
| 20 | 20 | echo "\n"; |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | $loop_canceller = |
| 43 | 43 | /** @param-out T $result */ |
| 44 | - function () use (&$result, $try): bool { |
|
| 44 | + function() use (&$result, $try): bool { |
|
| 45 | 45 | $result = $try(); |
| 46 | 46 | // one successful execution is enough |
| 47 | 47 | return false; |
@@ -31,13 +31,15 @@ |
||
| 31 | 31 | * @param class-string<\Throwable>[] $retry_on |
| 32 | 32 | * @return T |
| 33 | 33 | */ |
| 34 | - public function do( |
|
| 34 | + public function do { |
|
| 35 | + ( |
|
| 35 | 36 | callable $try, |
| 36 | 37 | array $retry_on, |
| 37 | 38 | int $max_retry, |
| 38 | 39 | int $interval_on_retry_ns, |
| 39 | 40 | ) { |
| 40 | 41 | $result = null; |
| 42 | + } |
|
| 41 | 43 | |
| 42 | 44 | $loop_canceller = |
| 43 | 45 | /** @param-out T $result */ |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | public function sort(): void |
| 66 | 66 | { |
| 67 | - \uasort($this->function_entries, function (FunctionEntry $a, FunctionEntry $b) { |
|
| 67 | + \uasort($this->function_entries, function(FunctionEntry $a, FunctionEntry $b) { |
|
| 68 | 68 | if ($b->count_exclusive === $a->count_exclusive) { |
| 69 | 69 | if ($b->count_inclusive === $a->count_inclusive) { |
| 70 | 70 | if ($b->total_count_exclusive === $a->total_count_exclusive) { |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function ptrace( |
| 22 | 22 | PtraceRequest $request, |
| 23 | 23 | int $pid, |
| 24 | - Addressable|CData|null|int $addr, |
|
| 25 | - Addressable|CData|null|int $data, |
|
| 24 | + Addressable | CData | null | int $addr, |
|
| 25 | + Addressable | CData | null | int $data, |
|
| 26 | 26 | ): int; |
| 27 | 27 | } |
@@ -92,8 +92,8 @@ |
||
| 92 | 92 | public function ptrace( |
| 93 | 93 | PtraceRequest $request, |
| 94 | 94 | int $pid, |
| 95 | - Addressable|CData|null|int $addr, |
|
| 96 | - Addressable|CData|null|int $data, |
|
| 95 | + Addressable | CData | null | int $addr, |
|
| 96 | + Addressable | CData | null | int $data, |
|
| 97 | 97 | ): int { |
| 98 | 98 | if (is_null($addr) or is_int($addr)) { |
| 99 | 99 | /** @var CInteger */ |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | |
| 58 | 58 | public function resolve(string $symbol_name): Elf64SymbolTableEntry |
| 59 | 59 | { |
| 60 | - $index = $this->hash_table->lookup($symbol_name, function (string $name, int $index) { |
|
| 60 | + $index = $this->hash_table->lookup($symbol_name, function(string $name, int $index) { |
|
| 61 | 61 | $symbol = $this->symbol_table->lookup($index); |
| 62 | 62 | return $name === $this->string_table->lookup($symbol->st_name); |
| 63 | 63 | }); |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $thread_pointer = $this->thread_pointer_retriever->getThreadPointer($pid); |
| 45 | 45 | |
| 46 | - [,,$thread_db_pthread_dtvp_offset] = $this->getLibThreadDbDescriptor('_thread_db_pthread_dtvp'); |
|
| 46 | + [,, $thread_db_pthread_dtvp_offset] = $this->getLibThreadDbDescriptor('_thread_db_pthread_dtvp'); |
|
| 47 | 47 | [$thread_db_dtv_dtv_size,,] = $this->getLibThreadDbDescriptor('_thread_db_dtv_dtv'); |
| 48 | - [,,$thread_db_dtv_t_pointer_val_offset] = $this->getLibThreadDbDescriptor('_thread_db_dtv_t_pointer_val'); |
|
| 48 | + [,, $thread_db_dtv_t_pointer_val_offset] = $this->getLibThreadDbDescriptor('_thread_db_dtv_t_pointer_val'); |
|
| 49 | 49 | // [,,] = $this->getLibThreadDbDescriptor($pid, '_thread_db_link_map_l_tls_modid'); |
| 50 | 50 | |
| 51 | 51 | $dtv_pointer_address = $thread_pointer + $thread_db_pthread_dtvp_offset; |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | if ($address_and_size === null) { |
| 61 | 61 | return null; |
| 62 | 62 | } |
| 63 | - [$address,] = $address_and_size; |
|
| 63 | + [$address, ] = $address_and_size; |
|
| 64 | 64 | return $address; |
| 65 | 65 | } |
| 66 | 66 | |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | $this->on_shutdown->register( |
| 76 | - function () use ($pid) { |
|
| 76 | + function() use ($pid) { |
|
| 77 | 77 | $this->pcntl->waitpid($pid, $status, 0); |
| 78 | 78 | } |
| 79 | 79 | ); |