From b0f0def83c09600ca598c27d9090abdf898b56bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Fri, 13 Oct 2023 15:14:35 +0800 Subject: [PATCH] =?UTF-8?q?build(PhpStan):=20=E6=9B=B4=E6=96=B0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李东云 --- phpstan.neon | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index 9f62620..8225941 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,18 +4,21 @@ # vendor/bin/phpstan analyse app --memory-limit 200M -l 0 # parameters: - level: 0 - reportUnmatchedIgnoredErrors: false - ignoreErrors: - - '#Static call to instance method Hyperf\\HttpServer\\Router\\Router::[a-zA-Z0-9\\_]+\(\)#' - - '#Static call to instance method Hyperf\\DbConnection\\Db::[a-zA-Z0-9\\_]+\(\)#' - - '#Constant BASE_PATH not found#' - - '#Property [a-zA-Z0-9\\_]+::\$[a-zA-Z0-9]+ is never written, only read.#' - - '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) has parameter \$[a-zA-Z0-9_]+ with no value type specified in iterable type array.#' - - '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) has parameter \$[a-zA-Z0-9_]+ with no type specified.#' - - '#Static call to instance method App\\Constants\\ErrorCode::getMessage\(\).#' - - '#Template type [a-zA-Z0-9]+ of method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) is not referenced in a parameter.#' - - '#Call to an undefined method Hyperf\\Database\\Query\\Builder::firstOrFail\(\).#' - - '#Method App\\Service\\Auth\\TokenServiceInterface::generate\(\) invoked with 1 parameter, 2 required.#' - - '#Call to an undefined method Hyperf\\Contract\\SessionInterface::isValidId\(\).#' - - '#Call to an undefined method LightSaml\\Model\\Protocol\\SamlMessage::setInResponseTo\(\).#' + level: 6 + reportUnmatchedIgnoredErrors: false + checkGenericClassInNonGenericObjectType: false + paths: + - app + - tests + ignoreErrors: + - '#Static call to instance method Hyperf\\HttpServer\\Router\\Router::[a-zA-Z0-9\\_]+\(\)#' + - '#Static call to instance method Hyperf\\DbConnection\\Db::[a-zA-Z0-9\\_]+\(\)#' + - '#Static call to instance method App\\Constants\\ErrorCode::getMessage\(\).#' + - '#Constant BASE_PATH not found#' + - '#Property [a-zA-Z0-9\\_]+::\$[a-zA-Z0-9]+ is never written, only read.#' + - '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) has parameter \$[a-zA-Z0-9_]+ with no value type specified in iterable type array.#' + - '#Method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) has parameter \$[a-zA-Z0-9_]+ with no type specified.#' + - '#Template type [a-zA-Z0-9]+ of method [a-zA-Z0-9\\_]+::[a-zA-Z0-9_]+\(\) is not referenced in a parameter.#' + - '#Call to an undefined method Hyperf\\Database\\Query\\Builder::firstOrFail\(\).#' + - '#Call to an undefined method Hyperf\\Contract\\SessionInterface::isValidId\(\).#' + - '#Call to an undefined method LightSaml\\Model\\Protocol\\SamlMessage::setInResponseTo\(\).#' \ No newline at end of file