diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3dcf0f6c2c0de..ad32c24f955fd 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -31,7 +31,6 @@ includes: - tests/phpstan/baselines/booleanAnd.alwaysFalse.neon - tests/phpstan/baselines/booleanAnd.alwaysTrue.neon - tests/phpstan/baselines/booleanAnd.leftAlwaysTrue.neon - - tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon - tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon - tests/phpstan/baselines/booleanNot.alwaysFalse.neon - tests/phpstan/baselines/booleanNot.alwaysTrue.neon @@ -90,7 +89,6 @@ includes: - tests/phpstan/baselines/return.unusedType.neon - tests/phpstan/baselines/smallerOrEqual.alwaysTrue.neon - tests/phpstan/baselines/staticClassAccess.privateMethod.neon - - tests/phpstan/baselines/ternary.alwaysFalse.neon - tests/phpstan/baselines/ternary.alwaysTrue.neon - tests/phpstan/baselines/varTag.noVariable.neon - tests/phpstan/baselines/variable.undefined.neon diff --git a/tests/phpstan/base.neon b/tests/phpstan/base.neon index 1c416cb3fe643..ab07051c9ad7a 100644 --- a/tests/phpstan/base.neon +++ b/tests/phpstan/base.neon @@ -79,6 +79,7 @@ parameters: - BACKGROUND_IMAGE - COOKIEPATH - CUSTOM_TAGS + - DB_COLLATE - DISALLOW_FILE_EDIT - DISALLOW_UNFILTERED_HTML - EMPTY_TRASH_DAYS @@ -104,6 +105,7 @@ parameters: - WP_DEBUG - WP_DEBUG_DISPLAY - WP_DEBUG_LOG + - WP_DEVELOPMENT_MODE - WP_LANG_DIR - WP_NETWORK_ADMIN - WP_POST_REVISIONS diff --git a/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon b/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon deleted file mode 100644 index 367c8dd35051c..0000000000000 --- a/tests/phpstan/baselines/booleanAnd.rightAlwaysFalse.neon +++ /dev/null @@ -1,25 +0,0 @@ -# PHPStan baseline for the `booleanAnd.rightAlwaysFalse` errors in WordPress core. -# -# https://phpstan.org/error-identifiers/booleanAnd.rightAlwaysFalse -# -# Each entry is scoped to a single file and carries an exact occurrence count, -# so that a new instance is reported as a new error rather than being absorbed -# silently. Fixing an occurrence therefore means decrementing or removing its -# entry here as part of the same change. -# -# The goal is to empty this file and delete it, along with the `includes` entry -# for it in phpstan.neon.dist. -# -# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with -# -# composer phpstan:baselines -- --identifier=booleanAnd.rightAlwaysFalse -# -# which reruns the analysis with this file suppressed so the errors surface again. - -parameters: - ignoreErrors: - - - message: '#^Right side of && is always false\.$#' - identifier: booleanAnd.rightAlwaysFalse - count: 1 - path: ../../../src/wp-includes/class-wpdb.php diff --git a/tests/phpstan/baselines/ternary.alwaysFalse.neon b/tests/phpstan/baselines/ternary.alwaysFalse.neon deleted file mode 100644 index b73c48bc42724..0000000000000 --- a/tests/phpstan/baselines/ternary.alwaysFalse.neon +++ /dev/null @@ -1,25 +0,0 @@ -# PHPStan baseline for the `ternary.alwaysFalse` errors in WordPress core. -# -# https://phpstan.org/error-identifiers/ternary.alwaysFalse -# -# Each entry is scoped to a single file and carries an exact occurrence count, -# so that a new instance is reported as a new error rather than being absorbed -# silently. Fixing an occurrence therefore means decrementing or removing its -# entry here as part of the same change. -# -# The goal is to empty this file and delete it, along with the `includes` entry -# for it in phpstan.neon.dist. -# -# Generated by `composer phpstan:baselines`. Do not edit by hand; regenerate with -# -# composer phpstan:baselines -- --identifier=ternary.alwaysFalse -# -# which reruns the analysis with this file suppressed so the errors surface again. - -parameters: - ignoreErrors: - - - message: '#^Ternary operator condition is always false\.$#' - identifier: ternary.alwaysFalse - count: 2 - path: ../../../src/wp-admin/includes/class-wp-debug-data.php