strikt types

This commit is contained in:
Troy Grunt
2026-02-15 14:45:02 +01:00
parent a093603c3c
commit cd031464e6
13 changed files with 77 additions and 69 deletions

View File

@@ -1,4 +1,5 @@
<?php
declare(strict_types=1);
function httpContext(int $timeout = 8) {
return stream_context_create([
@@ -158,11 +159,7 @@ function getPageInfo(string $url): array {
return $ret;
}
function sanitizeTags($input): array {
if (!is_array($input)) {
return [];
}
function sanitizeTags(array $input): array {
$ret = [];
foreach ($input as $tag) {
if (!is_string($tag)) {