Skip to content

Commit

Permalink
phpstan: Update baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Mar 26, 2024
1 parent 698e44f commit 5682d73
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 220 deletions.
1 change: 1 addition & 0 deletions library/Icingadb/Widget/Detail/MultiselectQuickActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ protected function assemble()
) {
$removeAckForm = (new RemoveAcknowledgementForm())
->setAction($this->getLink('removeAcknowledgement'))
// TODO: This is a hack as for the button label the count of objects is used. setCount? setMultiple?
->setObjects(array_fill(0, $this->summary->$acks, null));

$this->add(Html::tag('li', $removeAckForm));
Expand Down
60 changes: 5 additions & 55 deletions phpstan-baseline-7x.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,6 @@ parameters:
count: 1
path: application/controllers/EventController.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/AcknowledgeProblemForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/AddCommentForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/CheckNowForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/DeleteCommentForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/DeleteDowntimeForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ProcessCheckResultForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/RemoveAcknowledgementForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ScheduleCheckForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/ScheduleHostDowntimeForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ScheduleServiceDowntimeForm.php

-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/SendCustomNotificationForm.php

-
message: "#^Parameter \\#1 \\$str of function md5 expects string, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -164,3 +109,8 @@ parameters:
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#"
count: 1
path: library/Icingadb/Web/Controller.php

-
message: "#^Parameter \\#1 \\$objects of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:setObjects\\(\\) expects array\\<ipl\\\\Orm\\\\Model\\>\\|\\(Countable&Traversable\\<mixed, ipl\\\\Orm\\\\Model\\>\\), array\\<int, null\\>\\|false given\\.$#"
count: 1
path: library/Icingadb/Widget/Detail/MultiselectQuickActions.php
60 changes: 5 additions & 55 deletions phpstan-baseline-8x.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,6 @@ parameters:
count: 1
path: application/controllers/EventController.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/AcknowledgeProblemForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/AddCommentForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/CheckNowForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/DeleteCommentForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/DeleteDowntimeForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ProcessCheckResultForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/RemoveAcknowledgementForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ScheduleCheckForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/ScheduleHostDowntimeForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ScheduleServiceDowntimeForm.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/SendCustomNotificationForm.php

-
message: "#^Parameter \\#1 \\$string of function md5 expects string, mixed given\\.$#"
count: 1
Expand Down Expand Up @@ -159,3 +104,8 @@ parameters:
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#"
count: 1
path: library/Icingadb/Web/Controller.php

-
message: "#^Parameter \\#1 \\$objects of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:setObjects\\(\\) expects array\\<ipl\\\\Orm\\\\Model\\>\\|\\(Countable&Traversable\\<mixed, ipl\\\\Orm\\\\Model\\>\\), array\\<int, null\\> given\\.$#"
count: 1
path: library/Icingadb/Widget/Detail/MultiselectQuickActions.php
110 changes: 0 additions & 110 deletions phpstan-baseline-standard.neon
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ parameters:
count: 1
path: application/controllers/CommentController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
count: 1
path: application/controllers/CommentController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/CommentController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$comment \\(Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Comment\\) does not accept ipl\\\\Orm\\\\Model\\.$#"
count: 1
Expand Down Expand Up @@ -260,16 +250,6 @@ parameters:
count: 1
path: application/controllers/DowntimeController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
count: 1
path: application/controllers/DowntimeController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/DowntimeController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$downtime \\(Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Downtime\\) does not accept ipl\\\\Orm\\\\Model\\.$#"
count: 1
Expand Down Expand Up @@ -525,16 +505,6 @@ parameters:
count: 1
path: application/controllers/HostController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
count: 1
path: application/controllers/HostController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/HostController.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostgroupController\\:\\:indexAction\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -695,11 +665,6 @@ parameters:
count: 1
path: application/controllers/HostsController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostsController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/HostsController.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\MigrateController\\:\\:backendSupportAction\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -920,16 +885,6 @@ parameters:
count: 1
path: application/controllers/ServiceController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServiceController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
count: 1
path: application/controllers/ServiceController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServiceController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/ServiceController.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServicegroupController\\:\\:indexAction\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -1130,11 +1085,6 @@ parameters:
count: 1
path: application/controllers/ServicesController.php

-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServicesController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: application/controllers/ServicesController.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\TacticalController\\:\\:completeAction\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -1260,11 +1210,6 @@ parameters:
count: 1
path: application/forms/Command/CommandForm.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:filterGrantedOn\\(\\) has parameter \\$objects with no value type specified in iterable type Traversable\\.$#"
count: 1
path: application/forms/Command/CommandForm.php

-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:onSuccess\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -1285,11 +1230,6 @@ parameters:
count: 2
path: application/forms/Command/CommandForm.php

-
message: "#^Parameter \\#1 \\$objects of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:getCommands\\(\\) expects Traversable\\<mixed, ipl\\\\Orm\\\\Model\\>, mixed given\\.$#"
count: 1
path: application/forms/Command/CommandForm.php

-
message: "#^Parameter \\#1 \\$queryString of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:parseRestriction\\(\\) expects string, array\\<string\\> given\\.$#"
count: 3
Expand Down Expand Up @@ -1350,11 +1290,6 @@ parameters:
count: 1
path: application/forms/Command/Object/AcknowledgeProblemForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/AcknowledgeProblemForm.php

-
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
count: 1
Expand All @@ -1375,46 +1310,16 @@ parameters:
count: 1
path: application/forms/Command/Object/AddCommentForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/AddCommentForm.php

-
message: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#"
count: 1
path: application/forms/Command/Object/DeleteCommentForm.php

-
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
count: 1
path: application/forms/Command/Object/DeleteDowntimeForm.php

-
message: "#^Cannot access property \\$scheduled_by on mixed\\.$#"
count: 1
path: application/forms/Command/Object/DeleteDowntimeForm.php

-
message: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#"
count: 1
path: application/forms/Command/Object/DeleteDowntimeForm.php

-
message: "#^Cannot access property \\$passive_checks_enabled on mixed\\.$#"
count: 1
path: application/forms/Command/Object/ProcessCheckResultForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 2
path: application/forms/Command/Object/ProcessCheckResultForm.php

-
message: "#^Parameter \\#1 \\$objects of method Icinga\\\\Module\\\\Icingadb\\\\Command\\\\Object\\\\ObjectsCommand\\:\\:setObjects\\(\\) expects Traversable\\<mixed, ipl\\\\Orm\\\\Model\\>, Generator\\<int, mixed, mixed, void\\> given\\.$#"
count: 1
path: application/forms/Command/Object/ProcessCheckResultForm.php

-
message: "#^Parameter \\#1 \\$output of method Icinga\\\\Module\\\\Icingadb\\\\Command\\\\Object\\\\ProcessCheckResultCommand\\:\\:setOutput\\(\\) expects string, mixed given\\.$#"
count: 1
Expand All @@ -1435,11 +1340,6 @@ parameters:
count: 1
path: application/forms/Command/Object/RemoveAcknowledgementForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/RemoveAcknowledgementForm.php

-
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
count: 1
Expand All @@ -1450,11 +1350,6 @@ parameters:
count: 1
path: application/forms/Command/Object/ScheduleCheckForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/ScheduleCheckForm.php

-
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
count: 2
Expand Down Expand Up @@ -1535,11 +1430,6 @@ parameters:
count: 1
path: application/forms/Command/Object/SendCustomNotificationForm.php

-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
count: 1
path: application/forms/Command/Object/SendCustomNotificationForm.php

-
message: "#^Cannot call method getAttributes\\(\\) on ipl\\\\Html\\\\Contract\\\\Wrappable\\|null\\.$#"
count: 1
Expand Down

0 comments on commit 5682d73

Please sign in to comment.