Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix profiler explain error in SQLServerPlatform, OtherPlatform #1267

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Controller/ProfilerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ private function explainSQLitePlatform(Connection $connection, array $query): ar
}

/**
* @param mixed[] $query
*
* @return mixed[]
*/
private function explainSQLServerPlatform(Connection $connection, string $query): array
private function explainSQLServerPlatform(Connection $connection, array $query): array
{
if (stripos($query['sql'], 'SELECT') === 0) {
$sql = 'SET STATISTICS PROFILE ON; ' . $query['sql'] . '; SET STATISTICS PROFILE OFF;';
Expand All @@ -120,9 +122,11 @@ private function explainSQLServerPlatform(Connection $connection, string $query)
}

/**
* @param mixed[] $query
*
* @return mixed[]
*/
private function explainOtherPlatform(Connection $connection, string $query): array
private function explainOtherPlatform(Connection $connection, array $query): array
{
$params = $query['params'];

Expand Down