Skip to content

Commit a1c84d9

Browse files
committed
refactor: add explicit bool return type to array filter closures in ContentSecurityPolicy
1 parent 607c93d commit a1c84d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎system/HTTP/ContentSecurityPolicy.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,15 +1084,15 @@ protected function addToHeader(string $name, $values = null)
10841084

10851085
if ($sources !== []) {
10861086
if (count($sources) > 1) {
1087-
$sources = array_values(array_filter($sources, static fn ($s) => $s !== ''));
1087+
$sources = array_values(array_filter($sources, static fn ($s): bool => $s !== ''));
10881088
}
10891089

10901090
$this->tempHeaders[$name] = implode(' ', $sources);
10911091
}
10921092

10931093
if ($reportSources !== []) {
10941094
if (count($reportSources) > 1) {
1095-
$reportSources = array_values(array_filter($reportSources, static fn ($s) => $s !== ''));
1095+
$reportSources = array_values(array_filter($reportSources, static fn ($s): bool => $s !== ''));
10961096
}
10971097

10981098
$this->reportOnlyHeaders[$name] = implode(' ', $reportSources);

0 commit comments

Comments
 (0)