fix the rest problem code to phpstan-level-1

This commit is contained in:
crazywhalecc
2022-04-02 19:20:47 +08:00
committed by Jerry Ma
parent d490892092
commit daa1822bc5
4 changed files with 8 additions and 10 deletions

View File

@@ -22,12 +22,13 @@ class MessageUtil
/**
* 下载消息中 CQ 码的所有图片,通过 url
* @param $msg
* @param null $path
* @return array|false
*/
public static function downloadCQImage($msg, $path = null)
public static function downloadCQImage($msg, ?string $path = null)
{
$path = $path ?? DataProvider::getDataFolder() . 'images/';
if ($path === null) {
$path = DataProvider::getDataFolder() . 'images/';
}
if (!is_dir($path)) {
@mkdir($path);
}