mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
parent
bac734286d
commit
1bca59fe66
@ -60,7 +60,7 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
|
|||||||
foreach ($this->debugStack->queries as $q) {
|
foreach ($this->debugStack->queries as $q) {
|
||||||
$queries[] = array(
|
$queries[] = array(
|
||||||
'sql' => $q['sql'],
|
'sql' => $q['sql'],
|
||||||
'params' => (object) $this->getParameters($q),
|
'params' => (object) $this->getParameters($q['params'] ?? []),
|
||||||
'duration' => $q['executionMS'],
|
'duration' => $q['executionMS'],
|
||||||
'duration_str' => $this->formatDuration($q['executionMS'])
|
'duration_str' => $this->formatDuration($q['executionMS'])
|
||||||
);
|
);
|
||||||
@ -80,7 +80,7 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getParameters($query) : array
|
public function getParameters($params) : array
|
||||||
{
|
{
|
||||||
return array_map(function ($param) {
|
return array_map(function ($param) {
|
||||||
if (is_string($param)) {
|
if (is_string($param)) {
|
||||||
@ -95,7 +95,7 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid
|
|||||||
return json_encode($param);
|
return json_encode($param);
|
||||||
}
|
}
|
||||||
return $param ?: '';
|
return $param ?: '';
|
||||||
}, $query['params'] ?? []);
|
}, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user