From 131c5ebeee48c21e1309ee4fdb4be2db46649f4d Mon Sep 17 00:00:00 2001 From: neznaika0 Date: Fri, 10 Jan 2025 16:11:41 +0300 Subject: [PATCH] refactor: Fix phpstan method.unused (#9388) --- tests/_support/Test/TestForReflectionHelper.php | 4 ++-- utils/phpstan-baseline/loader.neon | 1 - utils/phpstan-baseline/method.unused.neon | 13 ------------- 3 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 utils/phpstan-baseline/method.unused.neon diff --git a/tests/_support/Test/TestForReflectionHelper.php b/tests/_support/Test/TestForReflectionHelper.php index c056777e30ec..b277509aebdf 100644 --- a/tests/_support/Test/TestForReflectionHelper.php +++ b/tests/_support/Test/TestForReflectionHelper.php @@ -28,12 +28,12 @@ public static function getStaticPrivate() return self::$static_private; } - private function privateMethod($param1, $param2) + private function privateMethod($param1, $param2) // @phpstan-ignore method.unused { return 'private ' . $param1 . $param2; } - private static function privateStaticMethod($param1, $param2) + private static function privateStaticMethod($param1, $param2) // @phpstan-ignore method.unused { return 'private_static ' . $param1 . $param2; } diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 886a77ea4843..712e5cb76c77 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -21,7 +21,6 @@ includes: - method.childReturnType.neon - method.impossibleType.neon - method.notFound.neon - - method.unused.neon - missingType.callable.neon - missingType.iterableValue.neon - missingType.parameter.neon diff --git a/utils/phpstan-baseline/method.unused.neon b/utils/phpstan-baseline/method.unused.neon deleted file mode 100644 index 10cbfe1513ea..000000000000 --- a/utils/phpstan-baseline/method.unused.neon +++ /dev/null @@ -1,13 +0,0 @@ -# total 2 errors - -parameters: - ignoreErrors: - - - message: '#^Method Tests\\Support\\Test\\TestForReflectionHelper\:\:privateMethod\(\) is unused\.$#' - count: 1 - path: ../../tests/_support/Test/TestForReflectionHelper.php - - - - message: '#^Static method Tests\\Support\\Test\\TestForReflectionHelper\:\:privateStaticMethod\(\) is unused\.$#' - count: 1 - path: ../../tests/_support/Test/TestForReflectionHelper.php