strikt types
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user