-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,18 +70,17 @@ private function processStore(ServerRequestInterface $request): ResponseInterfac | |
/** @var XHProfMessage $payload */ | ||
$payload = \json_decode((string) $request->getBody(), true, 96, \JSON_THROW_ON_ERROR); | ||
Check failure on line 71 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 71 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 71 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 71 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
|
||
|
||
\is_array($payload['profile'] ?? null) && \is_array($payload['tags'] ?? null) | ||
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
Check failure on line 73 in src/Handler/Http/Middleware/XHProfTrap.php GitHub Actions / phpstan (ubuntu-latest, 8.2, locked)
|
||
or throw new \InvalidArgumentException('Invalid payload'); | ||
|
||
$metadata = $payload; | ||
unset($metadata['profile'], $metadata['tags'], $metadata['date']); | ||
|
||
isset($payload['profile'], $payload['tags']) | ||
&& \is_array($payload['profile']) | ||
&& \is_array($payload['tags']) | ||
or throw new \InvalidArgumentException('Invalid payload'); | ||
|
||
/** @psalm-suppress MixedAssignment */ | ||
/** @var mixed $time */ | ||
$time = $request->getAttribute('begin_at'); | ||
$time = $time instanceof \DateTimeImmutable ? $time : new \DateTimeImmutable(); | ||
|
||
/** @psalm-suppress MixedArgumentTypeCoercion */ | ||
\Fiber::suspend( | ||
new Frame\Profiler( | ||
payload: Frame\Profiler\Payload::new( | ||
|