From 87664e2972bae2ff1f2c786fc5946a7f3277f9da Mon Sep 17 00:00:00 2001 From: ebln <34722048+ebln@users.noreply.github.com> Date: Mon, 3 Jun 2024 01:16:03 +0200 Subject: [PATCH] Trick psalm & phpstan --- phpstan-baseline-7.4.neon | 13 +++++++++++++ phpstan-ignore-by-version.neon.php | 14 ++++++++++++++ phpstan.neon | 3 +++ 3 files changed, 30 insertions(+) create mode 100644 phpstan-baseline-7.4.neon create mode 100644 phpstan-ignore-by-version.neon.php diff --git a/phpstan-baseline-7.4.neon b/phpstan-baseline-7.4.neon new file mode 100644 index 0000000..e2a3c34 --- /dev/null +++ b/phpstan-baseline-7.4.neon @@ -0,0 +1,13 @@ +parameters: + ignoreErrors: + - + message: "#^Call to an undefined method ReflectionClass\\:\\:getAttributes\\(\\)\\.$#" + path: src/ForceFactoryRule.php + + - + message: "#^Method Ebln\\\\PHPStan\\\\EnforceFactory\\\\ForceFactoryRule\\:\\:getFactoriesFromAttributeByClass\\(\\) has parameter \\$reflection with generic class ReflectionClass but does not specify its types\\: T$#" + path: src/ForceFactoryRule.php + + - + message: "#^PHPDoc tag @param for parameter \\$reflection with type PHPStan\\\\BetterReflection\\\\Reflection\\\\Adapter\\\\ReflectionClass\\|PHPStan\\\\BetterReflection\\\\Reflection\\\\Adapter\\\\ReflectionEnum is not subtype of native type ReflectionClass\\.$#" + path: src/ForceFactoryRule.php diff --git a/phpstan-ignore-by-version.neon.php b/phpstan-ignore-by-version.neon.php new file mode 100644 index 0000000..49d2af2 --- /dev/null +++ b/phpstan-ignore-by-version.neon.php @@ -0,0 +1,14 @@ +