diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon index 5be0f3817..96bfb4572 100644 --- a/phpstan-baseline-7x.neon +++ b/phpstan-baseline-7x.neon @@ -5,11 +5,6 @@ parameters: count: 2 path: application/forms/EntryForm.php - - - message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" - count: 2 - path: application/forms/EscalationRecipientForm.php - - message: "#^Parameter \\#1 \\$time of function strtotime expects string, mixed given\\.$#" count: 1 diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon index 99ed68cfb..0b1385373 100644 --- a/phpstan-baseline-8x.neon +++ b/phpstan-baseline-8x.neon @@ -5,11 +5,6 @@ parameters: count: 2 path: application/forms/EntryForm.php - - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" - count: 2 - path: application/forms/EscalationRecipientForm.php - - message: "#^Parameter \\#1 \\$datetime of function strtotime expects string, mixed given\\.$#" count: 1 diff --git a/phpstan-baseline-standard.neon b/phpstan-baseline-standard.neon index 1a449e551..c741330c7 100644 --- a/phpstan-baseline-standard.neon +++ b/phpstan-baseline-standard.neon @@ -140,61 +140,6 @@ parameters: count: 1 path: application/controllers/EventRuleController.php - - - message: "#^Parameter \\#1 \\$id of static method Icinga\\\\Module\\\\Notifications\\\\Common\\\\Links\\:\\:eventRule\\(\\) expects int, mixed given\\.$#" - count: 3 - path: application/controllers/EventRuleController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:delete\\(\\) expects string, mixed given\\.$#" - count: 3 - path: application/controllers/EventRuleController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:get\\(\\) expects string, mixed given\\.$#" - count: 3 - path: application/controllers/EventRuleController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:set\\(\\) expects string, mixed given\\.$#" - count: 2 - path: application/controllers/EventRuleController.php - - - - message: "#^Parameter \\#1 \\$query of method ipl\\\\Web\\\\Control\\\\SearchEditor\\:\\:setQueryString\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/controllers/EventRuleController.php - - - - message: "#^Parameter \\#1 \\$ruleId of method Icinga\\\\Module\\\\Notifications\\\\Controllers\\\\EventRuleController\\:\\:fromDb\\(\\) expects int, mixed given\\.$#" - count: 2 - path: application/controllers/EventRuleController.php - - - - message: "#^Cannot access offset 'object_filter' on mixed\\.$#" - count: 2 - path: application/controllers/EventRulesController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:delete\\(\\) expects string, int given\\.$#" - count: 1 - path: application/controllers/EventRulesController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:get\\(\\) expects string, int given\\.$#" - count: 4 - path: application/controllers/EventRulesController.php - - - - message: "#^Parameter \\#1 \\$key of method Icinga\\\\Web\\\\Session\\\\SessionNamespace\\:\\:set\\(\\) expects string, int given\\.$#" - count: 2 - path: application/controllers/EventRulesController.php - - - - message: "#^Parameter \\#1 \\$query of method ipl\\\\Web\\\\Control\\\\SearchEditor\\:\\:setQueryString\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/controllers/EventRulesController.php - - message: "#^Parameter \\#2 \\$default of method Icinga\\\\Web\\\\UrlParams\\:\\:shift\\(\\) expects string\\|null, int\\<1, max\\> given\\.$#" count: 1 @@ -265,21 +210,6 @@ parameters: count: 1 path: application/controllers/SchedulesController.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\AddEscalationForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/AddEscalationForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\AddFilterForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/AddFilterForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\BaseEscalationForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/BaseEscalationForm.php - - message: "#^Cannot call method getName\\(\\) on ipl\\\\Html\\\\Contract\\\\FormSubmitElement\\|null\\.$#" count: 2 @@ -465,151 +395,6 @@ parameters: count: 1 path: application/forms/EntryForm.php - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setName\\(\\)\\.$#" - count: 4 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\ValidHtml\\:\\:remove\\(\\)\\.$#" - count: 1 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Call to an undefined method ipl\\\\Stdlib\\\\Filter\\\\Rule\\:\\:getColumn\\(\\)\\.$#" - count: 2 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Call to an undefined method ipl\\\\Stdlib\\\\Filter\\\\Rule\\:\\:getValue\\(\\)\\.$#" - count: 1 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Cannot access offset non\\-falsy\\-string on iterable\\\\.$#" - count: 2 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EscalationConditionForm\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EscalationConditionForm\\:\\:getValues\\(\\) should return array but returns string\\.$#" - count: 1 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Parameter \\#1 \\$string of static method ipl\\\\Web\\\\Filter\\\\QueryString\\:\\:parse\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/forms/EscalationConditionForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setDisabledOptions\\(\\)\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setName\\(\\)\\.$#" - count: 3 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:setOptions\\(\\)\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Call to an undefined method ipl\\\\Html\\\\ValidHtml\\:\\:remove\\(\\)\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Cannot access offset non\\-falsy\\-string on iterable\\\\.$#" - count: 3 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Cannot access property \\$full_name on mixed\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Cannot access property \\$id on mixed\\.$#" - count: 3 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Cannot access property \\$name on mixed\\.$#" - count: 2 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EscalationRecipientForm\\:\\:fetchOptions\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EscalationRecipientForm\\:\\:getValues\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/EscalationRecipientForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\EventRuleForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/EventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\RemoveEscalationForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/RemoveEscalationForm.php - - - - message: "#^Call to an undefined method ipl\\\\Sql\\\\Connection\\:\\:lastInsertId\\(\\)\\.$#" - count: 3 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Cannot access property \\$id on mixed\\.$#" - count: 3 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:addRule\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:editRule\\(\\) has parameter \\$config with no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:insertOrUpdateEscalations\\(\\) has parameter \\$escalations with no value type specified in iterable type array\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:insertOrUpdateEscalations\\(\\) has parameter \\$ruleId with no type specified\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:onError\\(\\) has no return type specified\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Forms\\\\SaveEventRuleForm\\:\\:\\$submitLabel \\(string\\) on left side of \\?\\? is not nullable\\.$#" - count: 1 - path: application/forms/SaveEventRuleForm.php - - message: "#^Call to an undefined method ipl\\\\Sql\\\\Connection\\:\\:lastInsertId\\(\\)\\.$#" count: 1 @@ -680,16 +465,6 @@ parameters: count: 1 path: library/Notifications/Model/Channel.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Contact\\:\\:createBehaviors\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Model/Contact.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Contact\\:\\:createRelations\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Model/Contact.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\Contact\\:\\:getColumnDefinitions\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -860,11 +635,6 @@ parameters: count: 1 path: library/Notifications/Model/RuleEscalation.php - - - message: "#^Cannot call method first\\(\\) on mixed\\.$#" - count: 3 - path: library/Notifications/Model/RuleEscalationRecipient.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Model\\\\RuleEscalationRecipient\\:\\:createRelations\\(\\) has no return type specified\\.$#" count: 1 @@ -980,11 +750,6 @@ parameters: count: 1 path: library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php - - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" - count: 1 - path: library/Notifications/Web/Form/ContactForm.php - - message: "#^Call to an undefined method ipl\\\\Sql\\\\Connection\\:\\:lastInsertId\\(\\)\\.$#" count: 1 @@ -1335,81 +1100,6 @@ parameters: count: 1 path: library/Notifications/Widget/Detail/IncidentQuickActions.php - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Escalations\\:\\:addEscalation\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Escalations.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Escalations\\:\\:addEscalation\\(\\) has parameter \\$escalation with no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/Escalations.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Escalations\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Escalations.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Escalations\\:\\:\\$config has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Escalations.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\Escalations\\:\\:\\$escalations has no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/Escalations.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:__construct\\(\\) has parameter \\$config with no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:assemble\\(\\) has no return type specified\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:createConditionForm\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:createFilterString\\(\\) has parameter \\$filters with no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:createRecipientForm\\(\\) has parameter \\$values with no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:getConfig\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:getForms\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:setConfig\\(\\) has parameter \\$config with no type specified\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:\\$config type has no value type specified in iterable type array\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - - - message: "#^Property Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventRuleConfig\\:\\:\\$numEscalations is unused\\.$#" - count: 1 - path: library/Notifications/Widget/EventRuleConfig.php - - message: "#^Method Icinga\\\\Module\\\\Notifications\\\\Widget\\\\EventSourceBadge\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -1430,16 +1120,6 @@ parameters: count: 1 path: library/Notifications/Widget/FlowLine.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 1 - path: library/Notifications/Widget/ItemList/ContactListItem.php - - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Notifications/Widget/ItemList/ContactListItem.php - - message: "#^Parameter \\#2 \\$value of method Icinga\\\\Web\\\\Url\\:\\:setParam\\(\\) expects array\\|bool\\|string, int given\\.$#" count: 1 @@ -1685,11 +1365,6 @@ parameters: count: 1 path: library/Notifications/Widget/Schedule.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - 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