Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Feb 12, 2024
1 parent 1f43859 commit 0c5cebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DataCollector/QueryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(TimeDataCollector $timeCollector = null)
* @param int|null $hardLimit After the hard limit, queries are ignored
* @return void
*/
public function setLimits(?int $softLimit, ?int $hardLimit) : void
public function setLimits(?int $softLimit, ?int $hardLimit): void
{
$this->softLimit = $softLimit;
$this->hardLimit = $hardLimit;
Expand Down Expand Up @@ -618,14 +618,14 @@ public function collect()

if ($this->softLimit && $this->hardLimit && ($this->queryCount > $this->softLimit && $this->queryCount > $this->hardLimit)) {
array_unshift($statements, [
'sql' => '# Query soft and hard limit for Debugbar are reached. Only the first ' . $this->softLimit . ' queries show details. Queries after the first ' . $this->hardLimit. ' are ignored. Limits can be raised in the config (debugbar.options.db.soft/hard_limit).',
'sql' => '# Query soft and hard limit for Debugbar are reached. Only the first ' . $this->softLimit . ' queries show details. Queries after the first ' . $this->hardLimit . ' are ignored. Limits can be raised in the config (debugbar.options.db.soft/hard_limit).',
'type' => 'info',
]);
$statements[] = [
'sql' => '... ' . ($this->queryCount - $this->hardLimit) . ' additional queries are executed but now shown because of Debugbar query limits. Limits can be raised in the config (debugbar.options.db.soft/hard_limit)',
'type' => 'info',
];
} else if ($this->hardLimit && $this->queryCount > $this->hardLimit) {
} elseif ($this->hardLimit && $this->queryCount > $this->hardLimit) {
array_unshift($statements, [
'sql' => '# Query hard limit for Debugbar is reached after ' . $this->hardLimit . ' queries, additional ' . ($this->queryCount - $this->hardLimit) . ' queries are not shown.. Limits can be raised in the config (debugbar.options.db.hard_limit)',
'type' => 'info',
Expand Down

0 comments on commit 0c5cebc

Please sign in to comment.