mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
phpstan fix
This commit is contained in:
@@ -668,7 +668,7 @@ class Downloader
|
|||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
case 'custom': // Custom download method, like API-based download or other
|
case 'custom': // Custom download method, like API-based download or other
|
||||||
if (isset($conf['func']) && is_callable($conf['func'])) {
|
if (isset($conf['func'])) {
|
||||||
$conf['name'] = $name;
|
$conf['name'] = $name;
|
||||||
$conf['func']($force, $conf, $download_as);
|
$conf['func']($force, $conf, $download_as);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -525,7 +525,6 @@ class ConfigValidator
|
|||||||
'object|bool' => (is_assoc_array($value) || is_bool($value)) ?: throw new ValidationException("{$type} {$name} [{$field}] must be object or boolean"),
|
'object|bool' => (is_assoc_array($value) || is_bool($value)) ?: throw new ValidationException("{$type} {$name} [{$field}] must be object or boolean"),
|
||||||
'object|array' => is_array($value) ?: throw new ValidationException("{$type} {$name} [{$field}] must be an object or array"),
|
'object|array' => is_array($value) ?: throw new ValidationException("{$type} {$name} [{$field}] must be an object or array"),
|
||||||
'callable' => true, // Skip validation for callable
|
'callable' => true, // Skip validation for callable
|
||||||
default => true,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user