diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon index 5be0f3817..5c9adab60 100644 --- a/phpstan-baseline-7x.neon +++ b/phpstan-baseline-7x.neon @@ -1,10 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" - count: 2 - path: application/forms/EntryForm.php - - message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" count: 2 diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon index 99ed68cfb..a26c7dd57 100644 --- a/phpstan-baseline-8x.neon +++ b/phpstan-baseline-8x.neon @@ -1,10 +1,5 @@ parameters: ignoreErrors: - - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" - count: 2 - path: application/forms/EntryForm.php - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" count: 2 diff --git a/phpstan-baseline-standard.neon b/phpstan-baseline-standard.neon index 7c04a7968..2009dc0b3 100644 --- a/phpstan-baseline-standard.neon +++ b/phpstan-baseline-standard.neon @@ -45,11 +45,6 @@ parameters: count: 1 path: application/controllers/ChannelsController.php - - - message: "#^Parameter \\#1 \\$name of method ipl\\\\Web\\\\Widget\\\\Tabs\\:\\:add\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/controllers/ChannelsController.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 @@ -60,11 +55,6 @@ parameters: count: 1 path: application/controllers/ConfigController.php - - - message: "#^Parameter \\#1 \\$name of method ipl\\\\Web\\\\Widget\\\\Tabs\\:\\:add\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/controllers/ConfigController.php - - message: "#^Cannot access property \\$full_name on ipl\\\\Orm\\\\Model\\|null\\.$#" count: 1 @@ -120,11 +110,6 @@ parameters: count: 2 path: application/controllers/EventRuleController.php - - - message: "#^Cannot access property \\$rule_escalation on ipl\\\\Orm\\\\Model\\|null\\.$#" - count: 1 - path: application/controllers/EventRuleController.php - - message: "#^Cannot access property \\$rule_escalation_recipient on mixed\\.$#" count: 1 @@ -275,161 +260,6 @@ parameters: count: 1 path: application/forms/DatabaseConfigForm.php - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:prepareMultipartUpdate\\(\\)\\.$#" - count: 2 - path: application/forms/EntryForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setDescription\\(\\)\\.$#" - count: 3 - path: application/forms/EntryForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setLabel\\(\\)\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Call to an undefined method ipl\\\\Scheduler\\\\RRule\\:\\:getUntil\\(\\)\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Call to an undefined method ipl\\\\Sql\\\\Connection\\:\\:lastInsertId\\(\\)\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access offset 'frequency' on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access offset 'rrule' on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access offset 'start' on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access property \\$contact_id on mixed\\.$#" - count: 6 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access property \\$contactgroup_id on mixed\\.$#" - count: 4 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access property \\$full_name on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access property \\$id on mixed\\.$#" - count: 2 - path: application/forms/EntryForm.php - - - - message: "#^Cannot access property \\$name on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot call method add\\(\\) on DateTime\\|false\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot call method diff\\(\\) on mixed\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot call method format\\(\\) on DateTime\\|false\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot call method format\\(\\) on mixed\\.$#" - count: 2 - path: application/forms/EntryForm.php - - - - message: "#^Cannot call method getTimezone\\(\\) on DateTime\\|false\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Cannot cast mixed to int\\.$#" - count: 2 - path: application/forms/EntryForm.php - - - - message: "#^Cannot clone non\\-object variable \\$start of type DateTime\\|false\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EntryForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EntryForm\\:\\:formValuesToDb\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EntryForm\\:\\:getPartUpdates\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Method class@anonymous/application/forms/EntryForm\\.php\\:142\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:getValue\\(\\) invoked with 1 parameter, 0 required\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Parameter \\#1 \\$json of static method ipl\\\\Scheduler\\\\RRule\\:\\:fromJson\\(\\) expects string, string\\|false given\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Parameter \\#1 \\.\\.\\.\\$content of method ipl\\\\Html\\\\HtmlDocument\\:\\:setHtmlContent\\(\\) expects ipl\\\\Html\\\\ValidHtml, ipl\\\\Html\\\\Contract\\\\Wrappable\\|null given\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Parameter \\#2 \\$datetime of static method DateTime\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#" - count: 2 - path: application/forms/EntryForm.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: application/forms/EntryForm.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EntryForm\\:\\:\\$submitLabel \\(string\\) on left side of \\?\\? is not nullable\\.$#" - count: 1 - path: application/forms/EntryForm.php - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setName\\(\\)\\.$#" count: 4 @@ -580,11 +410,6 @@ parameters: count: 1 path: application/forms/ScheduleForm.php - - - message: "#^Cannot access property \\$id on mixed\\.$#" - count: 3 - path: application/forms/ScheduleForm.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\ScheduleForm\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -675,11 +500,6 @@ parameters: count: 1 path: library/Notifications/Model/ContactAddress.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Contactgroup\\:\\:createRelations\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Model/Contactgroup.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Event\\:\\:createBehaviors\\(\\) has no return type specified\\.$#" count: 1 @@ -840,11 +660,6 @@ parameters: count: 1 path: library/Notifications/Model/RuleEscalationRecipient.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\ScheduleMember\\:\\:createRelations\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Model/ScheduleMember.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Source\\:\\:createRelations\\(\\) has no return type specified\\.$#" count: 1 @@ -1000,26 +815,11 @@ parameters: count: 1 path: library/Notifications/Web/Form/EventRuleDecorator.php - - - message: "#^Call to an undefined method DateTimeInterface\\:\\:add\\(\\)\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - - - message: "#^Cannot call method diff\\(\\) on DateTime\\|null\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Notifications/Widget/Calendar.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\:\\:getEntries\\(\\) return type has no value type specified in iterable type Traversable\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\:\\:getModeStart\\(\\) should return DateTime but returns DateTime\\|false\\.$#" count: 2 @@ -1030,26 +830,6 @@ parameters: count: 1 path: library/Notifications/Widget/Calendar.php - - - message: "#^Parameter \\#1 \\$from of static method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Util\\:\\:diffHours\\(\\) expects DateTime, DateTime\\|null given\\.$#" - count: 2 - path: library/Notifications/Widget/Calendar.php - - - - message: "#^Parameter \\#1 \\$start of method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:setStart\\(\\) expects DateTime, DateTimeInterface given\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - - - message: "#^Parameter \\#1 \\$start of method ipl\\\\Scheduler\\\\RRule\\:\\:startAt\\(\\) expects DateTimeInterface, DateTime\\|null given\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - - - message: "#^Parameter \\#2 \\$to of static method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Util\\:\\:diffHours\\(\\) expects DateTime, DateTime\\|null given\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar.php - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\:\\:\\$addEntryUrl \\(ipl\\\\Web\\\\Url\\) does not accept ipl\\\\Web\\\\Url\\|null\\.$#" count: 1 @@ -1060,31 +840,6 @@ parameters: count: 1 path: library/Notifications/Widget/Calendar/Attendee.php - - - message: "#^Cannot call method format\\(\\) on DateTime\\|null\\.$#" - count: 7 - path: library/Notifications/Widget/Calendar/BaseGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\BaseGrid\\:\\:createGridSteps\\(\\) return type has no value type specified in iterable type Traversable\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/BaseGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\BaseGrid\\:\\:getGridArea\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/BaseGrid.php - - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, string\\|null given\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/BaseGrid.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\BaseGrid\\:\\:\\$extraEntriesCount type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/BaseGrid.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Controls\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -1100,91 +855,16 @@ parameters: count: 1 path: library/Notifications/Widget/Calendar/DayGrid.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\DayGrid\\:\\:createGridSteps\\(\\) return type has no value type specified in iterable type Traversable\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/DayGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\DayGrid\\:\\:getGridArea\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/DayGrid.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$description has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$end has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$id has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$isOccurrence has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$rrule has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$start has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Entry\\:\\:\\$url \\(ipl\\\\Web\\\\Url\\) does not accept ipl\\\\Web\\\\Url\\|null\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Entry.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\ExtraEntryCount\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/ExtraEntryCount.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\MonthGrid\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Notifications/Widget/Calendar/MonthGrid.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\MonthGrid\\:\\:createGridSteps\\(\\) return type has no value type specified in iterable type Traversable\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/MonthGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\MonthGrid\\:\\:getGridArea\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/MonthGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\Util\\:\\:diffHours\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/Util.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\WeekGrid\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Notifications/Widget/Calendar/WeekGrid.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\WeekGrid\\:\\:createGridSteps\\(\\) return type has no value type specified in iterable type Traversable\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/WeekGrid.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Calendar\\\\WeekGrid\\:\\:getGridArea\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Calendar/WeekGrid.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\CheckboxIcon\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -1410,11 +1090,6 @@ parameters: count: 2 path: library/Notifications/Widget/RecipientSuggestions.php - - - message: "#^Cannot access property \\$color on mixed\\.$#" - count: 2 - path: library/Notifications/Widget/RecipientSuggestions.php - - message: "#^Cannot access property \\$full_name on mixed\\.$#" count: 2 @@ -1480,66 +1155,11 @@ parameters: count: 1 path: library/Notifications/Widget/RuleEscalationRecipientBadge.php - - - message: "#^Cannot access property \\$contact on mixed\\.$#" - count: 2 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$contact_id on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$contactgroup on mixed\\.$#" - count: 2 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$description on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$end_time on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$id on mixed\\.$#" - count: 2 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$rrule on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$start_time on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$timeperiod_id on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - - - message: "#^Cannot access property \\$timezone on mixed\\.$#" - count: 2 - path: library/Notifications/Widget/Schedule.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Schedule\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 path: library/Notifications/Widget/Schedule.php - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Schedule\\:\\:\\$schedule \\(Icinga\\\\Module\\\\Notifications\\\\Model\\\\Schedule\\) does not accept Icinga\\\\Module\\\\Notifications\\\\Model\\\\Schedule\\|null\\.$#" - count: 1 - path: library/Notifications/Widget/Schedule.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\ShowMore\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1