Skip to content

Commit

Permalink
Adapt code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis-Proffit committed Oct 6, 2024
1 parent 9520f5e commit 6c6c670
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Controller/ProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,34 +87,34 @@ public function explainAction($token, $connectionName, $query)
/**
* Renders the profiler panel for the given token.
*
* @param string $token The profiler token
* @param string $token The profiler token
* @param string $connectionName
* @param int $query
* @param int $query
*
* @return Response A Response instance
*/
public function runAction($token, $connectionName, $query)
{
$this->profiler->disable();

$profile = $this->profiler->loadProfile($token);
$profile = $this->profiler->loadProfile($token);
$collector = $profile->getCollector('db');

assert($collector instanceof DoctrineDataCollector);

$queries = $collector->getQueries();

if (!isset($queries[$connectionName][$query])) {
if (! isset($queries[$connectionName][$query])) {
return new Response('This query does not exist.');
}

$query = $queries[$connectionName][$query];

$connection = $this->registry->getConnection($connectionName);

$result = $connection->executeQuery($query["sql"]);
$result = $connection->executeQuery($query['sql']);

return new Response($this->twig->render('@Doctrine/Collector/run.html.twig', ["result" => $result->fetchAllAssociative()]));
return new Response($this->twig->render('@Doctrine/Collector/run.html.twig', ['result' => $result->fetchAllAssociative()]));
}

/**
Expand Down

0 comments on commit 6c6c670

Please sign in to comment.