-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Phpstan: Create php version based baseline
- Loading branch information
1 parent
4c25771
commit e27641d
Showing
5 changed files
with
311 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$data of function hex2bin expects string, mixed given\\.$#" | ||
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 | ||
path: application/forms/RedisConfigForm.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$stack of function array_pop expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Command/Transport/ApiCommandTransport.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Command/Transport/CommandTransport.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/IcingaRedis.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$arr1 of function array_diff_key expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/ObjectInspectionDetail.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$data of function bin2hex expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/ObjectInspectionDetail.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function strtolower expects string, mixed given\\.$#" | ||
count: 2 | ||
path: library/Icingadb/Compat/UrlMigrator.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$input of function array_keys expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/CsvResultSet.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$input of function array_values expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/CsvResultSet.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/PivotTable.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Model/Behavior/ActionAndNoteUrl.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Model/CustomvarFlat.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$var of function count expects array\\|Countable, Icinga\\\\Module\\\\Reporting\\\\ReportData\\|null given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/ProvidedHook/Reporting/SlaReport.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$number of function number_format expects float, float\\|int\\|string given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Util/PerfData.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function trim expects string, string\\|null given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Util/PluginOutput.php | ||
|
||
- | ||
message: "#^Parameter \\#3 \\$encoding of function htmlspecialchars expects string, null given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Util/PluginOutput.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function trim expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Web/Controller.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Web/Controller.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$string of function hex2bin expects string, mixed given\\.$#" | ||
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 | ||
path: application/forms/RedisConfigForm.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$array of function array_pop expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Command/Transport/ApiCommandTransport.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Command/Transport/CommandTransport.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/IcingaRedis.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$array of function array_diff_key expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/ObjectInspectionDetail.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Common/ObjectInspectionDetail.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" | ||
count: 2 | ||
path: library/Icingadb/Compat/UrlMigrator.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$array of function array_keys expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/CsvResultSet.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$array of function array_values expects array, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/CsvResultSet.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Data/PivotTable.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Model/Behavior/ActionAndNoteUrl.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\<int, string\\>\\|false given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Model/CustomvarFlat.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, Icinga\\\\Module\\\\Reporting\\\\ReportData\\|null given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/ProvidedHook/Reporting/SlaReport.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$num of function number_format expects float, float\\|int\\|string given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Util/PerfData.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Util/PluginOutput.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function trim expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Web/Controller.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/Icingadb/Web/Controller.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
$includes = []; | ||
if (PHP_VERSION_ID >= 80000) { | ||
$includes[] = __DIR__ . '/phpstan-baseline-8x.neon'; | ||
} else { | ||
$includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; | ||
} | ||
|
||
return [ | ||
'includes' => $includes | ||
]; |
Oops, something went wrong.