diff --git a/dev/tools/phpstan/phpstan_v1_apstats.neon b/dev/tools/phpstan/phpstan_v1_apstats.neon index df6f6bef04e..c5d7ac42db2 100644 --- a/dev/tools/phpstan/phpstan_v1_apstats.neon +++ b/dev/tools/phpstan/phpstan_v1_apstats.neon @@ -67,8 +67,14 @@ parameters: reportMagicMethods: false reportMagicProperties: false treatPhpDocTypesAsCertain: false + # if you want to exclude something, generate the baseline to do that, add here give only pattern that does not give the opportunity to introduce new errors + # or pattern to avoid false positive of some bugged or allowed phpstan checks ignoreErrors: - '#.*phan-var#' + - '#^Expression "''…" on a separate line does not do anything\.$#' + - '#Empty array passed to foreach#' + - '#Unable to resolve the template type T#' + - '#in empty() always exists and is always falsy.#' - '#is always#' internalErrorsCountLimit: 50 cache: diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 362fcd5f0fd..ac5349159b6 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -70,11 +70,13 @@ parameters: reportMagicProperties: false treatPhpDocTypesAsCertain: false # if you want to exclude something, generate the baseline to do that, add here give only pattern that does not give the opportunity to introduce new errors + # or pattern to avoid false positive of some bugged or allowed phpstan checks ignoreErrors: - '#.*phan-var#' - '#^Expression "''…" on a separate line does not do anything\.$#' - '#Empty array passed to foreach#' - '#Unable to resolve the template type T#' + - '#in empty() always exists and is always falsy.#' internalErrorsCountLimit: 50 cache: # nodesByFileCountMax: 512