Skip to content

Commit

Permalink
Update DebuggingMiddleware.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ArrayIterator authored Jul 15, 2024
1 parent 834d089 commit 923c27b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Benchmark/Middlewares/DebuggingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use function sprintf;
use function str_contains;
use const PHP_INT_MAX;
use const PHP_INT_MIN;

class DebuggingMiddleware extends AbstractMiddleware
{
Expand Down Expand Up @@ -138,7 +137,9 @@ private function renderDebugBar($response) : mixed
// if profiler disabled, stop here!
$profiler = ContainerHelper::use(ProfilerInterface::class, $container);
$waterfall = ContainerHelper::use(Waterfall::class, $container);
if (!$profiler?->isEnable() || ! $waterfall || $response->getHeaderLine('Content-Type') !== '' && !DataType::isHtmlContentType($response)) {
if (!$profiler?->isEnable() || ! $waterfall
|| $response->getHeaderLine('Content-Type') !== '' && !DataType::isHtmlContentType($response)
) {
return $response;
}

Expand Down

0 comments on commit 923c27b

Please sign in to comment.