Skip to content

Commit 4769190

Browse files
committed
phpstan: Update baselines
1 parent 0a32221 commit 4769190

File tree

4 files changed

+11
-220
lines changed

4 files changed

+11
-220
lines changed

library/Icingadb/Widget/Detail/MultiselectQuickActions.php

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ protected function assemble()
6767
) {
6868
$removeAckForm = (new RemoveAcknowledgementForm())
6969
->setAction($this->getLink('removeAcknowledgement'))
70+
// TODO: This is a hack as for the button label the count of objects is used. setCount? setMultiple?
7071
->setObjects(array_fill(0, $this->summary->$acks, null));
7172

7273
$this->add(Html::tag('li', $removeAckForm));

phpstan-baseline-7x.neon

+5-55
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,6 @@ parameters:
55
count: 1
66
path: application/controllers/EventController.php
77

8-
-
9-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
10-
count: 2
11-
path: application/forms/Command/Object/AcknowledgeProblemForm.php
12-
13-
-
14-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
15-
count: 2
16-
path: application/forms/Command/Object/AddCommentForm.php
17-
18-
-
19-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
20-
count: 1
21-
path: application/forms/Command/Object/CheckNowForm.php
22-
23-
-
24-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
25-
count: 2
26-
path: application/forms/Command/Object/DeleteCommentForm.php
27-
28-
-
29-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
30-
count: 2
31-
path: application/forms/Command/Object/DeleteDowntimeForm.php
32-
33-
-
34-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
35-
count: 2
36-
path: application/forms/Command/Object/ProcessCheckResultForm.php
37-
38-
-
39-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
40-
count: 2
41-
path: application/forms/Command/Object/RemoveAcknowledgementForm.php
42-
43-
-
44-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
45-
count: 2
46-
path: application/forms/Command/Object/ScheduleCheckForm.php
47-
48-
-
49-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
50-
count: 1
51-
path: application/forms/Command/Object/ScheduleHostDowntimeForm.php
52-
53-
-
54-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
55-
count: 2
56-
path: application/forms/Command/Object/ScheduleServiceDowntimeForm.php
57-
58-
-
59-
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, mixed given\\.$#"
60-
count: 2
61-
path: application/forms/Command/Object/SendCustomNotificationForm.php
62-
638
-
649
message: "#^Parameter \\#1 \\$str of function md5 expects string, mixed given\\.$#"
6510
count: 1
@@ -164,3 +109,8 @@ parameters:
164109
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#"
165110
count: 1
166111
path: library/Icingadb/Web/Controller.php
112+
113+
-
114+
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\\.$#"
115+
count: 1
116+
path: library/Icingadb/Widget/Detail/MultiselectQuickActions.php

phpstan-baseline-8x.neon

+5-55
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,6 @@ parameters:
55
count: 1
66
path: application/controllers/EventController.php
77

8-
-
9-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
10-
count: 2
11-
path: application/forms/Command/Object/AcknowledgeProblemForm.php
12-
13-
-
14-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
15-
count: 2
16-
path: application/forms/Command/Object/AddCommentForm.php
17-
18-
-
19-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
20-
count: 1
21-
path: application/forms/Command/Object/CheckNowForm.php
22-
23-
-
24-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
25-
count: 2
26-
path: application/forms/Command/Object/DeleteCommentForm.php
27-
28-
-
29-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
30-
count: 2
31-
path: application/forms/Command/Object/DeleteDowntimeForm.php
32-
33-
-
34-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
35-
count: 2
36-
path: application/forms/Command/Object/ProcessCheckResultForm.php
37-
38-
-
39-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
40-
count: 2
41-
path: application/forms/Command/Object/RemoveAcknowledgementForm.php
42-
43-
-
44-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
45-
count: 2
46-
path: application/forms/Command/Object/ScheduleCheckForm.php
47-
48-
-
49-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
50-
count: 1
51-
path: application/forms/Command/Object/ScheduleHostDowntimeForm.php
52-
53-
-
54-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
55-
count: 2
56-
path: application/forms/Command/Object/ScheduleServiceDowntimeForm.php
57-
58-
-
59-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#"
60-
count: 2
61-
path: application/forms/Command/Object/SendCustomNotificationForm.php
62-
638
-
649
message: "#^Parameter \\#1 \\$string of function md5 expects string, mixed given\\.$#"
6510
count: 1
@@ -159,3 +104,8 @@ parameters:
159104
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#"
160105
count: 1
161106
path: library/Icingadb/Web/Controller.php
107+
108+
-
109+
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\\.$#"
110+
count: 1
111+
path: library/Icingadb/Widget/Detail/MultiselectQuickActions.php

phpstan-baseline-standard.neon

-110
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,6 @@ parameters:
120120
count: 1
121121
path: application/controllers/CommentController.php
122122

123-
-
124-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
125-
count: 1
126-
path: application/controllers/CommentController.php
127-
128-
-
129-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
130-
count: 1
131-
path: application/controllers/CommentController.php
132-
133123
-
134124
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\CommentController\\:\\:\\$comment \\(Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Comment\\) does not accept ipl\\\\Orm\\\\Model\\.$#"
135125
count: 1
@@ -260,16 +250,6 @@ parameters:
260250
count: 1
261251
path: application/controllers/DowntimeController.php
262252

263-
-
264-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
265-
count: 1
266-
path: application/controllers/DowntimeController.php
267-
268-
-
269-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
270-
count: 1
271-
path: application/controllers/DowntimeController.php
272-
273253
-
274254
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\DowntimeController\\:\\:\\$downtime \\(Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Downtime\\) does not accept ipl\\\\Orm\\\\Model\\.$#"
275255
count: 1
@@ -525,16 +505,6 @@ parameters:
525505
count: 1
526506
path: application/controllers/HostController.php
527507

528-
-
529-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
530-
count: 1
531-
path: application/controllers/HostController.php
532-
533-
-
534-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
535-
count: 1
536-
path: application/controllers/HostController.php
537-
538508
-
539509
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostgroupController\\:\\:indexAction\\(\\) has no return type specified\\.$#"
540510
count: 1
@@ -695,11 +665,6 @@ parameters:
695665
count: 1
696666
path: application/controllers/HostsController.php
697667

698-
-
699-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\HostsController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
700-
count: 1
701-
path: application/controllers/HostsController.php
702-
703668
-
704669
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\MigrateController\\:\\:backendSupportAction\\(\\) has no return type specified\\.$#"
705670
count: 1
@@ -920,16 +885,6 @@ parameters:
920885
count: 1
921886
path: application/controllers/ServiceController.php
922887

923-
-
924-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServiceController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) does not accept array\\.$#"
925-
count: 1
926-
path: application/controllers/ServiceController.php
927-
928-
-
929-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServiceController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
930-
count: 1
931-
path: application/controllers/ServiceController.php
932-
933888
-
934889
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServicegroupController\\:\\:indexAction\\(\\) has no return type specified\\.$#"
935890
count: 1
@@ -1130,11 +1085,6 @@ parameters:
11301085
count: 1
11311086
path: application/controllers/ServicesController.php
11321087

1133-
-
1134-
message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\ServicesController\\:\\:\\$commandTargets \\(ipl\\\\Orm\\\\Query\\) in isset\\(\\) is not nullable\\.$#"
1135-
count: 1
1136-
path: application/controllers/ServicesController.php
1137-
11381088
-
11391089
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\TacticalController\\:\\:completeAction\\(\\) has no return type specified\\.$#"
11401090
count: 1
@@ -1260,11 +1210,6 @@ parameters:
12601210
count: 1
12611211
path: application/forms/Command/CommandForm.php
12621212

1263-
-
1264-
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:filterGrantedOn\\(\\) has parameter \\$objects with no value type specified in iterable type Traversable\\.$#"
1265-
count: 1
1266-
path: application/forms/Command/CommandForm.php
1267-
12681213
-
12691214
message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:onSuccess\\(\\) has no return type specified\\.$#"
12701215
count: 1
@@ -1285,11 +1230,6 @@ parameters:
12851230
count: 2
12861231
path: application/forms/Command/CommandForm.php
12871232

1288-
-
1289-
message: "#^Parameter \\#1 \\$objects of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:getCommands\\(\\) expects Traversable\\<mixed, ipl\\\\Orm\\\\Model\\>, mixed given\\.$#"
1290-
count: 1
1291-
path: application/forms/Command/CommandForm.php
1292-
12931233
-
12941234
message: "#^Parameter \\#1 \\$queryString of method Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\CommandForm\\:\\:parseRestriction\\(\\) expects string, array\\<string\\> given\\.$#"
12951235
count: 3
@@ -1350,11 +1290,6 @@ parameters:
13501290
count: 1
13511291
path: application/forms/Command/Object/AcknowledgeProblemForm.php
13521292

1353-
-
1354-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1355-
count: 1
1356-
path: application/forms/Command/Object/AcknowledgeProblemForm.php
1357-
13581293
-
13591294
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
13601295
count: 1
@@ -1375,46 +1310,16 @@ parameters:
13751310
count: 1
13761311
path: application/forms/Command/Object/AddCommentForm.php
13771312

1378-
-
1379-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1380-
count: 1
1381-
path: application/forms/Command/Object/AddCommentForm.php
1382-
13831313
-
13841314
message: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#"
13851315
count: 1
13861316
path: application/forms/Command/Object/DeleteCommentForm.php
13871317

1388-
-
1389-
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
1390-
count: 1
1391-
path: application/forms/Command/Object/DeleteDowntimeForm.php
1392-
1393-
-
1394-
message: "#^Cannot access property \\$scheduled_by on mixed\\.$#"
1395-
count: 1
1396-
path: application/forms/Command/Object/DeleteDowntimeForm.php
1397-
13981318
-
13991319
message: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#"
14001320
count: 1
14011321
path: application/forms/Command/Object/DeleteDowntimeForm.php
14021322

1403-
-
1404-
message: "#^Cannot access property \\$passive_checks_enabled on mixed\\.$#"
1405-
count: 1
1406-
path: application/forms/Command/Object/ProcessCheckResultForm.php
1407-
1408-
-
1409-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1410-
count: 2
1411-
path: application/forms/Command/Object/ProcessCheckResultForm.php
1412-
1413-
-
1414-
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\\.$#"
1415-
count: 1
1416-
path: application/forms/Command/Object/ProcessCheckResultForm.php
1417-
14181323
-
14191324
message: "#^Parameter \\#1 \\$output of method Icinga\\\\Module\\\\Icingadb\\\\Command\\\\Object\\\\ProcessCheckResultCommand\\:\\:setOutput\\(\\) expects string, mixed given\\.$#"
14201325
count: 1
@@ -1435,11 +1340,6 @@ parameters:
14351340
count: 1
14361341
path: application/forms/Command/Object/RemoveAcknowledgementForm.php
14371342

1438-
-
1439-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1440-
count: 1
1441-
path: application/forms/Command/Object/RemoveAcknowledgementForm.php
1442-
14431343
-
14441344
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
14451345
count: 1
@@ -1450,11 +1350,6 @@ parameters:
14501350
count: 1
14511351
path: application/forms/Command/Object/ScheduleCheckForm.php
14521352

1453-
-
1454-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1455-
count: 1
1456-
path: application/forms/Command/Object/ScheduleCheckForm.php
1457-
14581353
-
14591354
message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#"
14601355
count: 2
@@ -1535,11 +1430,6 @@ parameters:
15351430
count: 1
15361431
path: application/forms/Command/Object/SendCustomNotificationForm.php
15371432

1538-
-
1539-
message: "#^Parameter \\#1 \\$iterable of function ipl\\\\Stdlib\\\\iterable_value_first expects iterable, mixed given\\.$#"
1540-
count: 1
1541-
path: application/forms/Command/Object/SendCustomNotificationForm.php
1542-
15431433
-
15441434
message: "#^Cannot call method getAttributes\\(\\) on ipl\\\\Html\\\\Contract\\\\Wrappable\\|null\\.$#"
15451435
count: 1

0 commit comments

Comments
 (0)