Skip to content

Commit

Permalink
refactor: suppress PHPStan errors
Browse files Browse the repository at this point in the history
 ------ -------------------------------------------------------------------
  Line   system/Debug/Toolbar.php
 ------ -------------------------------------------------------------------
  150    Binary operation "+" between non-falsy-string and 1 results in an
         error.
  175    Binary operation "+" between non-falsy-string and 1 results in an
         error.
 ------ -------------------------------------------------------------------
  • Loading branch information
kenjis committed Nov 22, 2023
1 parent 3c38acb commit 568538e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/Debug/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ public function run(float $startTime, float $totalTime, RequestInterface $reques
$data['vars']['headers'][esc($name)] = esc($value->getValueLine());
} else {
foreach ($value as $i => $header) {
$index = $i + 1;
$data['vars']['headers'][esc($name)] ??= '';
$data['vars']['headers'][esc($name)] .= ' (' . $i + 1 . ') '
$data['vars']['headers'][esc($name)] .= ' (' . $index . ') '
. esc($header->getValueLine());
}
}
Expand All @@ -171,8 +172,9 @@ public function run(float $startTime, float $totalTime, RequestInterface $reques
$data['vars']['response']['headers'][esc($name)] = esc($value->getValueLine());
} else {
foreach ($value as $i => $header) {
$index = $i + 1;
$data['vars']['response']['headers'][esc($name)] ??= '';
$data['vars']['response']['headers'][esc($name)] .= ' (' . $i + 1 . ') '
$data['vars']['response']['headers'][esc($name)] .= ' (' . $index . ') '
. esc($header->getValueLine());
}
}
Expand Down

0 comments on commit 568538e

Please sign in to comment.