diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon new file mode 100644 index 00000000..95dbfe5e --- /dev/null +++ b/phpstan-baseline-7x.neon @@ -0,0 +1,16 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\$arr1 of function array_merge_recursive expects array, array\\|object\\|null given\\.$#" + count: 1 + path: src/Form.php + + - + message: "#^Parameter \\#3 \\$length of function substr expects int, int\\<1, max\\>\\|null given\\.$#" + count: 1 + path: src/FormElement/LocalDateTimeElement.php + + - + message: "#^Parameter \\#2 \\$args of function vsprintf expects array\\, array\\ given\\.$#" + count: 1 + path: src/FormattedString.php diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon new file mode 100644 index 00000000..66ee929b --- /dev/null +++ b/phpstan-baseline-8x.neon @@ -0,0 +1,11 @@ +parameters: + ignoreErrors: + - + message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge_recursive expects array, array\\|object\\|null given\\.$#" + count: 1 + path: src/Form.php + + - + message: "#^Parameter \\#2 \\$values of function vsprintf expects array\\, array\\ given\\.$#" + count: 1 + path: src/FormattedString.php diff --git a/phpstan-baseline-by-php-version.php b/phpstan-baseline-by-php-version.php new file mode 100644 index 00000000..4bd791e8 --- /dev/null +++ b/phpstan-baseline-by-php-version.php @@ -0,0 +1,12 @@ += 80000) { + $includes[] = __DIR__ . '/phpstan-baseline-8x.neon'; +} else { + $includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; +} + +return [ + 'includes' => $includes +]; diff --git a/phpstan-baseline.neon b/phpstan-baseline-standard.neon similarity index 98% rename from phpstan-baseline.neon rename to phpstan-baseline-standard.neon index f5e47760..b3cd7980 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline-standard.neon @@ -245,11 +245,6 @@ parameters: count: 1 path: src/Form.php - - - message: "#^Parameter \\#1 \\.\\.\\.\\$arrays of function array_merge_recursive expects array, array\\|object\\|null given\\.$#" - count: 1 - path: src/Form.php - - message: "#^Parameter \\#3 \\$postfix of method ipl\\\\Html\\\\Form\\:\\:addPluginLoader\\(\\) expects string, string\\|null given\\.$#" count: 2 @@ -590,11 +585,6 @@ parameters: count: 1 path: src/FormattedString.php - - - message: "#^Parameter \\#2 \\$values of function vsprintf expects array\\, array\\ given\\.$#" - count: 1 - path: src/FormattedString.php - - message: "#^Property ipl\\\\Html\\\\FormattedString\\:\\:\\$args \\(array\\\\) does not accept array\\\\.$#" count: 1 diff --git a/phpstan.neon b/phpstan.neon index 6caa8d47..1ae5bcb7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ includes: - - phpstan-baseline.neon + - phpstan-baseline-standard.neon + - phpstan-baseline-by-php-version.php parameters: level: max