diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c4fda7711f053..97398be27bcb5 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -31,7 +31,6 @@ includes: - tests/phpstan/baselines/booleanAnd.rightAlwaysTrue.neon - tests/phpstan/baselines/booleanNot.alwaysFalse.neon - tests/phpstan/baselines/booleanNot.alwaysTrue.neon - - tests/phpstan/baselines/booleanOr.alwaysFalse.neon - tests/phpstan/baselines/booleanOr.alwaysTrue.neon - tests/phpstan/baselines/class.notFound.neon - tests/phpstan/baselines/deadCode.unreachable.neon diff --git a/src/wp-includes/class-wp-http-cookie.php b/src/wp-includes/class-wp-http-cookie.php index 4546f58a1a159..6e4a0519dea5c 100644 --- a/src/wp-includes/class-wp-http-cookie.php +++ b/src/wp-includes/class-wp-http-cookie.php @@ -26,7 +26,7 @@ class WP_Http_Cookie { * * @since 2.8.0 * - * @var string + * @var string|null */ public $name; @@ -35,7 +35,7 @@ class WP_Http_Cookie { * * @since 2.8.0 * - * @var string + * @var string|null */ public $value; diff --git a/tests/phpstan/baselines/booleanOr.alwaysFalse.neon b/tests/phpstan/baselines/booleanOr.alwaysFalse.neon deleted file mode 100644 index 86e1740697619..0000000000000 --- a/tests/phpstan/baselines/booleanOr.alwaysFalse.neon +++ /dev/null @@ -1,25 +0,0 @@ -# PHPStan baseline for the `booleanOr.alwaysFalse` errors in WordPress core. -# -# https://phpstan.org/error-identifiers/booleanOr.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=booleanOr.alwaysFalse -# -# which reruns the analysis with this file suppressed so the errors surface again. - -parameters: - ignoreErrors: - - - message: '#^Result of \|\| is always false\.$#' - identifier: booleanOr.alwaysFalse - count: 1 - path: ../../../src/wp-includes/class-wp-http-cookie.php diff --git a/tests/phpstan/baselines/isset.property.neon b/tests/phpstan/baselines/isset.property.neon index 5590e90865e7e..a0d03b6a07a32 100644 --- a/tests/phpstan/baselines/isset.property.neon +++ b/tests/phpstan/baselines/isset.property.neon @@ -118,16 +118,6 @@ parameters: identifier: isset.property count: 1 path: ../../../src/wp-includes/class-wp-http-cookie.php - - - message: '#^Property WP_Http_Cookie\:\:\$name \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../src/wp-includes/class-wp-http-cookie.php - - - message: '#^Property WP_Http_Cookie\:\:\$value \(string\) in isset\(\) is not nullable\.$#' - identifier: isset.property - count: 1 - path: ../../../src/wp-includes/class-wp-http-cookie.php - message: '#^Property WP_Post\:\:\$ID \(int\<0, max\>\) in isset\(\) is not nullable\.$#' identifier: isset.property