Skip to content

Commit

Permalink
fixup command panel
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Oct 22, 2022
1 parent 4096902 commit 96a5cdf
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Bundle\WebProfilerBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Debug\CliRequest;
use Symfony\Bundle\FullStack;
use Symfony\Bundle\WebProfilerBundle\Csp\ContentSecurityPolicyHandler;
use Symfony\Bundle\WebProfilerBundle\Profiler\TemplateManager;
Expand Down Expand Up @@ -88,10 +87,7 @@ public function panelAction(Request $request, string $token): Response
}

if (null === $profileType) {
$profileType = match ($profile->getVirtualType()) {
CliRequest::class => 'command',
default => 'request',
};
$profileType = $profile->getVirtualType() ?? 'request';
}

if (null === $panel) {
Expand Down Expand Up @@ -423,10 +419,7 @@ private function renderWithCspNonces(Request $request, string $template, array $
*/
private function findProfiles(?string $ip = null, ?string $url = null, ?string $limit = null, ?string $method = null, ?string $start = null, ?string $end = null, string $statusCode = null, string $profileType = null): array
{
$virtualType = match ($profileType) {
'command' => CliRequest::class,
default => null,
};
$virtualType = 'request' === $profileType ? null : $profileType;

return $this->profiler->find($ip, $url, $limit, $method, $start, $end, $statusCode, $virtualType);
}
Expand Down

0 comments on commit 96a5cdf

Please sign in to comment.