Skip to content

Commit

Permalink
fixed Fixed TypeError: Dibi\Bridges\Tracy\Panel::getConnectionName():…
Browse files Browse the repository at this point in the history
… Argument #1 ($connection) must be of type Dibi\Connection, null given
  • Loading branch information
stanley89 authored and dg committed Dec 4, 2023
1 parent 86a71dd commit 270211c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dibi/Bridges/Tracy/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ public function getPanel(): ?string
#tracy-debug .tracy-DibiProfiler-source { color: #999 !important }
#tracy-debug tracy-DibiProfiler tr table { margin: 8px 0; max-height: 150px; overflow:auto } </style>
<h1>Queries:' . "\u{a0}" . count($this->events)
. ($totalTime === null ? '' : ", time:\u{a0}" . number_format($totalTime * 1000, 1, '.', "\u{202f}") . "\u{202f}ms") . ', '
. htmlspecialchars($this->getConnectionName($singleConnection)) . '</h1>
. ($totalTime === null ? '' : ", time:\u{a0}" . number_format($totalTime * 1000, 1, '.', "\u{202f}") . "\u{202f}ms")

Check failure on line 154 in src/Dibi/Bridges/Tracy/Panel.php

View workflow job for this annotation

GitHub Actions / PHPStan

Strict comparison using === between (float|int) and null will always evaluate to false.
. ($singleConnection === null ? '' : ', ' . htmlspecialchars($this->getConnectionName($singleConnection))) . '</h1>
<div class="tracy-inner tracy-DibiProfiler">
<table class="tracy-sortable">
<tr><th>Time&nbsp;ms</th><th>SQL Statement</th><th>Rows</th>' . (!$singleConnection ? '<th>Connection</th>' : '') . '</tr>
Expand Down

0 comments on commit 270211c

Please sign in to comment.