Skip to content

Commit

Permalink
I'm not sure whether to hate phpstan or php
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Nov 27, 2023
1 parent d276e82 commit bb22e6d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
6 changes: 6 additions & 0 deletions phpstan-baseline-8.2+.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects iterable, ipl\\\\Orm\\\\Model\\|null given\\.$#"
count: 1
path: application/controllers/EventRuleController.php
6 changes: 6 additions & 0 deletions phpstan-baseline-by-php-version.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
$includes[] = __DIR__ . '/phpstan-baseline-7x.neon';
}

if (PHP_VERSION_ID >= 80200) {
$includes[] = __DIR__ . '/phpstan-baseline-8.2+.neon';
} else {
$includes[] = __DIR__ . '/phpstan-baseline-pre-8.2.neon';
}

return [
'includes' => $includes
];
6 changes: 6 additions & 0 deletions phpstan-baseline-pre-8.2.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects Traversable, ipl\\\\Orm\\\\Model\\|null given\\.$#"
count: 1
path: application/controllers/EventRuleController.php
5 changes: 0 additions & 5 deletions phpstan-baseline-standard.neon
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,6 @@ parameters:
count: 3
path: application/controllers/EventRuleController.php

-
message: "#^Parameter \\#1 \\$iterator of function iterator_to_array expects iterable, ipl\\\\Orm\\\\Model\\|null given\\.$#"
count: 1
path: application/controllers/EventRuleController.php

-
message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:delete\\(\\) expects string, mixed given\\.$#"
count: 3
Expand Down

0 comments on commit bb22e6d

Please sign in to comment.