mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 16:45:35 +08:00
strict to phpstan-level-4
This commit is contained in:
@@ -7,6 +7,7 @@ declare(strict_types=1);
|
||||
namespace ZM\Utils;
|
||||
|
||||
use Doctrine\Common\Annotations\AnnotationReader;
|
||||
use Error;
|
||||
use Exception;
|
||||
use ReflectionClass;
|
||||
use Swoole\Process;
|
||||
@@ -22,6 +23,7 @@ class Terminal
|
||||
|
||||
/**
|
||||
* @throws Exception
|
||||
* @throws Error
|
||||
* @return bool
|
||||
* @noinspection PhpMissingReturnTypeInspection
|
||||
* @noinspection PhpUnused
|
||||
|
||||
@@ -76,13 +76,13 @@ class ZMUtil
|
||||
|
||||
/**
|
||||
* 使用Psr-4标准获取目录下的所有类
|
||||
* @param string $dir 目录
|
||||
* @param string $base_namespace 基础命名空间
|
||||
* @param null|mixed $rule 规则
|
||||
* @param bool $return_path_value 是否返回文件路径
|
||||
* @param string $dir 目录
|
||||
* @param string $base_namespace 基础命名空间
|
||||
* @param null|mixed $rule 规则
|
||||
* @param bool|string $return_path_value 是否返回文件路径,返回文件路径的话传入字符串
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getClassesPsr4(string $dir, string $base_namespace, $rule = null, bool $return_path_value = false): array
|
||||
public static function getClassesPsr4(string $dir, string $base_namespace, $rule = null, $return_path_value = false): array
|
||||
{
|
||||
// 预先读取下composer的file列表
|
||||
$composer = json_decode(file_get_contents(DataProvider::getSourceRootDir() . '/composer.json'), true);
|
||||
|
||||
Reference in New Issue
Block a user