diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 510c05f8d..d17da2f90 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,13 +32,13 @@ jobs: - name: Setup dependencies run: | - composer require -n --no-progress overtrue/phplint - git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2 - git clone --depth 1 https://github.com/Icinga/icingaweb2-module-reporting.git vendor/reporting - git clone --depth 1 https://github.com/Icinga/icingaweb2-module-x509.git vendor/x509 - git clone --depth 1 https://github.com/Icinga/icingaweb2-module-pdfexport.git vendor/pdfexport - git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library - git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty + composer require -n --no-progress overtrue/phplint phpstan/phpstan + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2.git /icingaweb2 + sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git /usr/share/icinga-php/ipl + sudo git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git /usr/share/icinga-php/vendor + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-reporting.git /usr/share/icingaweb2-modules/reporting + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-pdfexport.git /usr/share/icingaweb2-modules/pdfexport + sudo git clone --depth 1 https://github.com/Icinga/icingaweb2-module-x509.git /usr/share/icingaweb2-modules/x509 - name: PHP Lint if: ${{ ! cancelled() }} @@ -50,7 +50,7 @@ jobs: - name: PHPStan if: ${{ ! cancelled() }} - uses: php-actions/phpstan@v3 + run: ./vendor/bin/phpstan analyse test: name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }} diff --git a/application/clicommands/MigrateCommand.php b/application/clicommands/MigrateCommand.php index 6d034ee39..17892bb45 100644 --- a/application/clicommands/MigrateCommand.php +++ b/application/clicommands/MigrateCommand.php @@ -496,9 +496,8 @@ public function dashboardAction(): void ); $changed = false; - /** @var ConfigObject $dashboardConfig */ + /** @var ConfigObject $dashboardConfig */ foreach ($dashboardsConfig->getConfigObject() as $name => $dashboardConfig) { - /** @var ?string $dashboardUrlString */ $dashboardUrlString = $dashboardConfig->get('url'); if ($dashboardUrlString !== null) { $dashBoardUrl = Url::fromPath($dashboardUrlString, [], new Request()); @@ -595,9 +594,8 @@ public function filterAction(): void private function transformNavigationItems(Config $config, string $owner, int &$rc): bool { $updated = false; - /** @var ConfigObject $newConfigObject */ + /** @var ConfigObject $newConfigObject */ foreach ($config->getConfigObject() as $section => $newConfigObject) { - /** @var string $configOwner */ $configOwner = $newConfigObject->get('owner') ?? ''; if ($configOwner && $configOwner !== $owner) { continue; @@ -686,9 +684,8 @@ private function migrateNavigationItems(Config $config, string $owner, string $p $newConfig = $config->getConfigFile() === $path ? $config : $this->readFromIni($path, $rc); $updated = false; - /** @var ConfigObject $configObject */ + /** @var ConfigObject $configObject */ foreach ($config->getConfigObject() as $configObject) { - /** @var string $configOwner */ $configOwner = $configObject->get('owner') ?? ''; if ($configOwner && $configOwner !== $owner) { continue; diff --git a/library/Icingadb/Command/Transport/CommandTransport.php b/library/Icingadb/Command/Transport/CommandTransport.php index ea125bc81..952cb1486 100644 --- a/library/Icingadb/Command/Transport/CommandTransport.php +++ b/library/Icingadb/Command/Transport/CommandTransport.php @@ -50,7 +50,7 @@ public static function getConfig(): Config /** * Create a transport from config * - * @param ConfigObject $config + * @param ConfigObject $config * * @return ApiCommandTransport * @@ -59,7 +59,7 @@ public static function getConfig(): Config public static function createTransport(ConfigObject $config): ApiCommandTransport { $config = clone $config; - switch (strtolower($config->transport)) { + switch (strtolower($config->transport ?? '')) { case ApiCommandTransport::TRANSPORT: $transport = new ApiCommandTransport(); break; diff --git a/library/Icingadb/Compat/CompatObject.php b/library/Icingadb/Compat/CompatObject.php index 6a30751d3..1d9657db8 100644 --- a/library/Icingadb/Compat/CompatObject.php +++ b/library/Icingadb/Compat/CompatObject.php @@ -361,13 +361,14 @@ protected function getDataView() */ private function getBoolType($value) { - switch ($value) { - case false: - return 0; - case true: - return 1; - case 'sticky': - return 2; + if ($value === 'sticky') { + return 2; } + + if (is_string($value)) { + return null; + } + + return (int) $value; } } diff --git a/library/Icingadb/Model/AcknowledgementHistory.php b/library/Icingadb/Model/AcknowledgementHistory.php index 549d2ff26..edbcc8378 100644 --- a/library/Icingadb/Model/AcknowledgementHistory.php +++ b/library/Icingadb/Model/AcknowledgementHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -16,6 +17,21 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, the query * needs a `acknowledgement_history.service_id IS NULL OR acknowledgement_history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property DateTime $set_time + * @property ?DateTime $clear_time + * @property ?string $author + * @property ?string $cleared_by + * @property ?string $comment + * @property ?DateTime $expire_time + * @property ?bool $is_sticky + * @property ?bool $is_persistent */ class AcknowledgementHistory extends Model { diff --git a/library/Icingadb/Model/ActionUrl.php b/library/Icingadb/Model/ActionUrl.php index e0b092eed..928ce35d4 100644 --- a/library/Icingadb/Model/ActionUrl.php +++ b/library/Icingadb/Model/ActionUrl.php @@ -10,6 +10,11 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string[] $action_url + * @property string $environment_id + */ class ActionUrl extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Checkcommand.php b/library/Icingadb/Model/Checkcommand.php index 400a24bd1..7f55c0dd9 100644 --- a/library/Icingadb/Model/Checkcommand.php +++ b/library/Icingadb/Model/Checkcommand.php @@ -10,6 +10,17 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property ?string $zone_id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $command + * @property int $timeout + */ class Checkcommand extends Model { public function getTableName() diff --git a/library/Icingadb/Model/CheckcommandArgument.php b/library/Icingadb/Model/CheckcommandArgument.php index 3fb4ad5a3..155f6dacf 100644 --- a/library/Icingadb/Model/CheckcommandArgument.php +++ b/library/Icingadb/Model/CheckcommandArgument.php @@ -9,6 +9,22 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $checkcommand_id + * @property string $argument_key + * @property string $environment_id + * @property string $properties_checksum + * @property ?string $argument_value + * @property ?int $argument_order + * @property ?string $description + * @property ?string $argument_key_override + * @property string $repeat_key + * @property string $required + * @property ?string $set_if + * @property ?string $separator + * @property string $skip_key + */ class CheckcommandArgument extends Model { public function getTableName() @@ -35,6 +51,7 @@ public function getColumns() 'repeat_key', 'required', 'set_if', + 'separator', 'skip_key' ]; } diff --git a/library/Icingadb/Model/CheckcommandCustomvar.php b/library/Icingadb/Model/CheckcommandCustomvar.php index 0a834b58c..5382689f3 100644 --- a/library/Icingadb/Model/CheckcommandCustomvar.php +++ b/library/Icingadb/Model/CheckcommandCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $checkcommand_id + * @property string $customvar_id + * @property string $environment_id + */ class CheckcommandCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/CheckcommandEnvvar.php b/library/Icingadb/Model/CheckcommandEnvvar.php index 517a45fc5..05cdeed25 100644 --- a/library/Icingadb/Model/CheckcommandEnvvar.php +++ b/library/Icingadb/Model/CheckcommandEnvvar.php @@ -9,6 +9,14 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $checkcommand_id + * @property string $envvar_key + * @property string $environment_id + * @property string $properties_checksum + * @property string $envvar_value + */ class CheckcommandEnvvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Comment.php b/library/Icingadb/Model/Comment.php index bcdd5e05a..bdfcaf00a 100644 --- a/library/Icingadb/Model/Comment.php +++ b/library/Icingadb/Model/Comment.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use Icinga\Module\Icingadb\Model\Behavior\ReRoute; use ipl\Orm\Behavior\Binary; @@ -12,6 +13,24 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $author + * @property string $text + * @property string $entry_type + * @property DateTime $entry_time + * @property bool $is_persistent + * @property bool $is_sticky + * @property ?DateTime $expire_time + * @property ?string $zone_id + */ class Comment extends Model { public function getTableName() diff --git a/library/Icingadb/Model/CommentHistory.php b/library/Icingadb/Model/CommentHistory.php index 5f03e685a..1cb02e3ad 100644 --- a/library/Icingadb/Model/CommentHistory.php +++ b/library/Icingadb/Model/CommentHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -16,6 +17,23 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, * the query needs a `comment_history.service_id IS NULL OR comment_history_service.id IS NOT NULL` where. + * + * @property string $comment_id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property DateTime $entry_time + * @property string $author + * @property ?string $removed_by + * @property string $comment + * @property string $entry_type + * @property bool $is_persistent + * @property bool $is_sticky + * @property ?DateTime $expire_time + * @property ?DateTime $remove_time + * @property bool $has_been_removed */ class CommentHistory extends Model { diff --git a/library/Icingadb/Model/Customvar.php b/library/Icingadb/Model/Customvar.php index e0432298c..70fb70980 100644 --- a/library/Icingadb/Model/Customvar.php +++ b/library/Icingadb/Model/Customvar.php @@ -9,6 +9,13 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $name + * @property string $value + */ class Customvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/CustomvarFlat.php b/library/Icingadb/Model/CustomvarFlat.php index 99d8acae1..f9f3c5a8f 100644 --- a/library/Icingadb/Model/CustomvarFlat.php +++ b/library/Icingadb/Model/CustomvarFlat.php @@ -11,6 +11,14 @@ use ipl\Orm\Relations; use Traversable; +/** + * @property string $id + * @property string $environment_id + * @property string $customvar_id + * @property string $flatname_checksum + * @property string $flatname + * @property ?string $flatvalue + */ class CustomvarFlat extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Downtime.php b/library/Icingadb/Model/Downtime.php index 7f600e93c..b2ba61710 100644 --- a/library/Icingadb/Model/Downtime.php +++ b/library/Icingadb/Model/Downtime.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use Icinga\Module\Icingadb\Model\Behavior\ReRoute; use ipl\Orm\Behavior\Binary; @@ -12,6 +13,32 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property ?string $triggered_by_id + * @property ?string $parent_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $author + * @property string $comment + * @property DateTime $entry_time + * @property DateTime $scheduled_start_time + * @property DateTime $scheduled_end_time + * @property int $scheduled_duration + * @property bool $is_flexible + * @property int $flexible_duration + * @property bool $is_in_effect + * @property ?DateTime $start_time + * @property ?DateTime $end_time + * @property int $duration + * @property ?string $scheduled_by + * @property ?string $zone_id + */ class Downtime extends Model { public function getTableName() diff --git a/library/Icingadb/Model/DowntimeHistory.php b/library/Icingadb/Model/DowntimeHistory.php index 7ba992fb1..b69a0979b 100644 --- a/library/Icingadb/Model/DowntimeHistory.php +++ b/library/Icingadb/Model/DowntimeHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -16,6 +17,29 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, * the query needs a `downtime_history.service_id IS NULL OR downtime_history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property ?string $triggered_by_id + * @property ?string $parent_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property DateTime $entry_time + * @property string $author + * @property ?string $cancelled_by + * @property string $comment + * @property bool $is_flexible + * @property int $flexible_duration + * @property DateTime $scheduled_start_time + * @property DateTime $scheduled_end_time + * @property DateTime $start_time + * @property DateTime $end_time + * @property ?string $scheduled_by + * @property bool $has_been_cancelled + * @property DateTime $trigger_time + * @property ?DateTime $cancel_time */ class DowntimeHistory extends Model { @@ -49,6 +73,7 @@ public function getColumns() 'scheduled_end_time', 'start_time', 'end_time', + 'scheduled_by', 'has_been_cancelled', 'trigger_time', 'cancel_time' diff --git a/library/Icingadb/Model/Endpoint.php b/library/Icingadb/Model/Endpoint.php index 257001b74..f8a9b8c0f 100644 --- a/library/Icingadb/Model/Endpoint.php +++ b/library/Icingadb/Model/Endpoint.php @@ -9,6 +9,15 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $zone_id + */ class Endpoint extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Environment.php b/library/Icingadb/Model/Environment.php index 919ca1ce1..cd8208257 100644 --- a/library/Icingadb/Model/Environment.php +++ b/library/Icingadb/Model/Environment.php @@ -9,6 +9,10 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $name + */ class Environment extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Eventcommand.php b/library/Icingadb/Model/Eventcommand.php index ad18e2210..68c1c065a 100644 --- a/library/Icingadb/Model/Eventcommand.php +++ b/library/Icingadb/Model/Eventcommand.php @@ -10,6 +10,17 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property ?string $zone_id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $command + * @property int $timeout + */ class Eventcommand extends Model { public function getTableName() diff --git a/library/Icingadb/Model/EventcommandArgument.php b/library/Icingadb/Model/EventcommandArgument.php index 485e5d345..1f60ac25c 100644 --- a/library/Icingadb/Model/EventcommandArgument.php +++ b/library/Icingadb/Model/EventcommandArgument.php @@ -9,6 +9,22 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $eventcommand_id + * @property string $argument_key + * @property string $environment_id + * @property string $properties_checksum + * @property ?string $argument_value + * @property ?int $argument_order + * @property ?string $description + * @property ?string $argument_key_override + * @property string $repeat_key + * @property string $required + * @property ?string $set_if + * @property ?string $separator + * @property string $skip_key + */ class EventcommandArgument extends Model { public function getTableName() @@ -35,6 +51,7 @@ public function getColumns() 'repeat_key', 'required', 'set_if', + 'separator', 'skip_key' ]; } diff --git a/library/Icingadb/Model/EventcommandCustomvar.php b/library/Icingadb/Model/EventcommandCustomvar.php index 3d1fa48e8..0da010bc8 100644 --- a/library/Icingadb/Model/EventcommandCustomvar.php +++ b/library/Icingadb/Model/EventcommandCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $eventcommand_id + * @property string $customvar_id + * @property string $environment_id + */ class EventcommandCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/EventcommandEnvvar.php b/library/Icingadb/Model/EventcommandEnvvar.php index 3883befcb..2eb8acf0f 100644 --- a/library/Icingadb/Model/EventcommandEnvvar.php +++ b/library/Icingadb/Model/EventcommandEnvvar.php @@ -9,6 +9,14 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $eventcommand_id + * @property string $envvar_key + * @property string $environment_id + * @property string $properties_checksum + * @property string $envvar_value + */ class EventcommandEnvvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/FlappingHistory.php b/library/Icingadb/Model/FlappingHistory.php index 69711ebdb..e060ca6e7 100644 --- a/library/Icingadb/Model/FlappingHistory.php +++ b/library/Icingadb/Model/FlappingHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; use ipl\Orm\Behaviors; @@ -15,6 +16,19 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, * the query needs a `flapping_history.service_id IS NULL OR flapping_history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property DateTime $start_time + * @property ?DateTime $end_time + * @property ?float $percent_state_change_start + * @property ?float $percent_state_change_end + * @property float $flapping_threshold_low + * @property float $flapping_threshold_high */ class FlappingHistory extends Model { diff --git a/library/Icingadb/Model/History.php b/library/Icingadb/Model/History.php index a34b3bdff..3643a22bb 100644 --- a/library/Icingadb/Model/History.php +++ b/library/Icingadb/Model/History.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\ReRoute; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -16,6 +17,21 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid * this, the query needs a `history.service_id IS NULL OR history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property ?string $comment_history_id + * @property ?string $downtime_history_id + * @property ?string $flapping_history_id + * @property ?string $notification_history_id + * @property ?string $acknowledgement_history_id + * @property ?string $state_history_id + * @property string $event_type + * @property DateTime $event_time */ class History extends Model { diff --git a/library/Icingadb/Model/Host.php b/library/Icingadb/Model/Host.php index e1296c80d..c6979839e 100644 --- a/library/Icingadb/Model/Host.php +++ b/library/Icingadb/Model/Host.php @@ -16,6 +16,46 @@ /** * Host model. + * + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property string $address + * @property string $address6 + * @property ?string $address_bin + * @property ?string $address6_bin + * @property string $checkcommand_name + * @property string $checkcommand_id + * @property int $max_check_attempts + * @property string $check_timeperiod_name + * @property ?string $check_timeperiod_id + * @property ?int $check_timeout + * @property int $check_interval + * @property int $check_retry_interval + * @property bool $active_checks_enabled + * @property bool $passive_checks_enabled + * @property bool $event_handler_enabled + * @property bool $notifications_enabled + * @property bool $flapping_enabled + * @property float $flapping_threshold_low + * @property float $flapping_threshold_high + * @property bool $perfdata_enabled + * @property string $eventcommand_name + * @property ?string $eventcommand_id + * @property bool $is_volatile + * @property ?string $action_url_id + * @property ?string $notes_url_id + * @property string $notes + * @property ?string $icon_image_id + * @property string $icon_image_alt + * @property string $zone_name + * @property ?string $zone_id + * @property string $command_endpoint_name + * @property ?string $command_endpoint_id */ class Host extends Model { diff --git a/library/Icingadb/Model/HostCustomvar.php b/library/Icingadb/Model/HostCustomvar.php index 9f7df2649..bda786b39 100644 --- a/library/Icingadb/Model/HostCustomvar.php +++ b/library/Icingadb/Model/HostCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $host_id + * @property string $customvar_id + * @property string $environment_id + */ class HostCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Hostgroup.php b/library/Icingadb/Model/Hostgroup.php index 97930faac..1ff6f0fba 100644 --- a/library/Icingadb/Model/Hostgroup.php +++ b/library/Icingadb/Model/Hostgroup.php @@ -10,6 +10,16 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property ?string $zone_id + */ class Hostgroup extends Model { public function getTableName() diff --git a/library/Icingadb/Model/HostgroupCustomvar.php b/library/Icingadb/Model/HostgroupCustomvar.php index 41272d142..d3dd09b2e 100644 --- a/library/Icingadb/Model/HostgroupCustomvar.php +++ b/library/Icingadb/Model/HostgroupCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $hostgroup_id + * @property string $customvar_id + * @property string $environment_id + */ class HostgroupCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/HostgroupMember.php b/library/Icingadb/Model/HostgroupMember.php index 3660e71aa..e03db733d 100644 --- a/library/Icingadb/Model/HostgroupMember.php +++ b/library/Icingadb/Model/HostgroupMember.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $host_id + * @property string $hostgroup_id + * @property string $environment_id + */ class HostgroupMember extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Hostgroupsummary.php b/library/Icingadb/Model/Hostgroupsummary.php index a9295bb16..637996b68 100644 --- a/library/Icingadb/Model/Hostgroupsummary.php +++ b/library/Icingadb/Model/Hostgroupsummary.php @@ -13,6 +13,26 @@ use ipl\Sql\Expression; use ipl\Sql\Select; +/** + * @property string $id + * @property string $display_name + * @property string $name + * @property int $hosts_down_handled + * @property int $hosts_down_unhandled + * @property int $hosts_pending + * @property int $hosts_total + * @property int $hosts_up + * @property int $hosts_severity + * @property int $services_critical_handled + * @property int $services_critical_unhandled + * @property int $services_ok + * @property int $services_pending + * @property int $services_total + * @property int $services_unknown_handled + * @property int $services_unknown_unhandled + * @property int $services_warning_handled + * @property int $services_warning_unhandled + */ class Hostgroupsummary extends UnionModel { public static function on(Connection $db) diff --git a/library/Icingadb/Model/HoststateSummary.php b/library/Icingadb/Model/HoststateSummary.php index 93268f348..3184c282d 100644 --- a/library/Icingadb/Model/HoststateSummary.php +++ b/library/Icingadb/Model/HoststateSummary.php @@ -7,6 +7,20 @@ use ipl\Sql\Connection; use ipl\Sql\Expression; +/** + * @property int $hosts_acknowledged + * @property int $hosts_active_checks_enabled + * @property int $hosts_passive_checks_enabled + * @property int $hosts_down_handled + * @property int $hosts_down_unhandled + * @property int $hosts_event_handler_enabled + * @property int $hosts_flapping_enabled + * @property int $hosts_notifications_enabled + * @property int $hosts_pending + * @property int $hosts_problems_unacknowledged + * @property int $hosts_total + * @property int $hosts_up + */ class HoststateSummary extends Host { public function getSummaryColumns() diff --git a/library/Icingadb/Model/IconImage.php b/library/Icingadb/Model/IconImage.php index 212234a9f..58f0be61c 100644 --- a/library/Icingadb/Model/IconImage.php +++ b/library/Icingadb/Model/IconImage.php @@ -9,6 +9,11 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $icon_image + * @property string $environment_id + */ class IconImage extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Instance.php b/library/Icingadb/Model/Instance.php index 73db56597..716d23da5 100644 --- a/library/Icingadb/Model/Instance.php +++ b/library/Icingadb/Model/Instance.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\BoolCast; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -11,6 +12,21 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property DateTime $heartbeat + * @property bool $responsible + * @property bool $icinga2_active_host_checks_enabled + * @property bool $icinga2_active_service_checks_enabled + * @property bool $icinga2_event_handlers_enabled + * @property bool $icinga2_flap_detection_enabled + * @property bool $icinga2_notifications_enabled + * @property bool $icinga2_performance_data_enabled + * @property DateTime $icinga2_start_time + * @property string $icinga2_version + */ class Instance extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotesUrl.php b/library/Icingadb/Model/NotesUrl.php index 5865c524f..138eaba0c 100644 --- a/library/Icingadb/Model/NotesUrl.php +++ b/library/Icingadb/Model/NotesUrl.php @@ -10,6 +10,11 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string[] $notes_url + * @property string $environment_id + */ class NotesUrl extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Notification.php b/library/Icingadb/Model/Notification.php index 8d423013a..4c15d2eeb 100644 --- a/library/Icingadb/Model/Notification.php +++ b/library/Icingadb/Model/Notification.php @@ -11,6 +11,24 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $host_id + * @property ?string $service_id + * @property string $notificationcommand_id + * @property ?int $times_begin + * @property ?int $times_end + * @property int $notification_interval + * @property ?string $timeperiod_id + * @property string[] $states + * @property string[] $types + * @property ?string $zone_id + */ class Notification extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotificationCustomvar.php b/library/Icingadb/Model/NotificationCustomvar.php index 620ae5c5d..655d1de9f 100644 --- a/library/Icingadb/Model/NotificationCustomvar.php +++ b/library/Icingadb/Model/NotificationCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notification_id + * @property string $customvar_id + * @property string $environment_id + */ class NotificationCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotificationHistory.php b/library/Icingadb/Model/NotificationHistory.php index c635dbb5d..08903ad6f 100644 --- a/library/Icingadb/Model/NotificationHistory.php +++ b/library/Icingadb/Model/NotificationHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use Icinga\Module\Icingadb\Model\Behavior\ReRoute; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; @@ -16,6 +17,21 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, the * query needs a `notification_history.service_id IS NULL OR notification_history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property string $notification_id + * @property string $type + * @property DateTime $send_time + * @property int $state + * @property int $previous_hard_state + * @property string $author + * @property string $text + * @property int $users_notified */ class NotificationHistory extends Model { diff --git a/library/Icingadb/Model/NotificationUser.php b/library/Icingadb/Model/NotificationUser.php index ab23ad4fc..efb779cad 100644 --- a/library/Icingadb/Model/NotificationUser.php +++ b/library/Icingadb/Model/NotificationUser.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notification_id + * @property string $user_id + * @property string $environment_id + */ class NotificationUser extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotificationUsergroup.php b/library/Icingadb/Model/NotificationUsergroup.php index bd60fae7e..a50333753 100644 --- a/library/Icingadb/Model/NotificationUsergroup.php +++ b/library/Icingadb/Model/NotificationUsergroup.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notification_id + * @property string $usergroup_id + * @property string $environment_id + */ class NotificationUsergroup extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Notificationcommand.php b/library/Icingadb/Model/Notificationcommand.php index 6ee2a217b..c170aae40 100644 --- a/library/Icingadb/Model/Notificationcommand.php +++ b/library/Icingadb/Model/Notificationcommand.php @@ -10,6 +10,17 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property ?string $zone_id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $command + * @property int $timeout + */ class Notificationcommand extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotificationcommandArgument.php b/library/Icingadb/Model/NotificationcommandArgument.php index e8550226b..e3a5e6757 100644 --- a/library/Icingadb/Model/NotificationcommandArgument.php +++ b/library/Icingadb/Model/NotificationcommandArgument.php @@ -9,6 +9,22 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notificationcommand_id + * @property string $argument_key + * @property string $environment_id + * @property string $properties_checksum + * @property ?string $argument_value + * @property ?int $argument_order + * @property ?string $description + * @property ?string $argument_key_override + * @property string $repeat_key + * @property string $required + * @property ?string $set_if + * @property ?string $separator + * @property string $skip_key + */ class NotificationcommandArgument extends Model { public function getTableName() @@ -35,6 +51,7 @@ public function getColumns() 'repeat_key', 'required', 'set_if', + 'separator', 'skip_key' ]; } diff --git a/library/Icingadb/Model/NotificationcommandCustomvar.php b/library/Icingadb/Model/NotificationcommandCustomvar.php index bd103f774..f5419272c 100644 --- a/library/Icingadb/Model/NotificationcommandCustomvar.php +++ b/library/Icingadb/Model/NotificationcommandCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notificationcommand_id + * @property string $customvar_id + * @property string $environment_id + */ class NotificationcommandCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/NotificationcommandEnvvar.php b/library/Icingadb/Model/NotificationcommandEnvvar.php index 09f77b0cc..0180be615 100644 --- a/library/Icingadb/Model/NotificationcommandEnvvar.php +++ b/library/Icingadb/Model/NotificationcommandEnvvar.php @@ -9,6 +9,14 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $notificationcommand_id + * @property string $envvar_key + * @property string $environment_id + * @property string $properties_checksum + * @property string $envvar_value + */ class NotificationcommandEnvvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Service.php b/library/Icingadb/Model/Service.php index c57b6ba12..1d97b96ac 100644 --- a/library/Icingadb/Model/Service.php +++ b/library/Icingadb/Model/Service.php @@ -14,6 +14,44 @@ use ipl\Orm\Relations; use ipl\Orm\ResultSet; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $host_id + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property string $checkcommand_name + * @property string $checkcommand_id + * @property int $max_check_attempts + * @property string $check_timeperiod_name + * @property ?string $check_timeperiod_id + * @property ?int $check_timeout + * @property int $check_interval + * @property int $check_retry_interval + * @property bool $active_checks_enabled + * @property bool $passive_checks_enabled + * @property bool $event_handler_enabled + * @property bool $notifications_enabled + * @property bool $flapping_enabled + * @property float $flapping_threshold_low + * @property float $flapping_threshold_high + * @property bool $perfdata_enabled + * @property string $eventcommand_name + * @property ?string $eventcommand_id + * @property bool $is_volatile + * @property ?string $action_url_id + * @property ?string $notes_url_id + * @property string $notes + * @property ?string $icon_image_id + * @property string $icon_image_alt + * @property string $zone_name + * @property ?string $zone_id + * @property string $command_endpoint_name + * @property ?string $command_endpoint_id + */ class Service extends Model { use Auth; diff --git a/library/Icingadb/Model/ServiceCustomvar.php b/library/Icingadb/Model/ServiceCustomvar.php index 07ee84c98..ba462f11f 100644 --- a/library/Icingadb/Model/ServiceCustomvar.php +++ b/library/Icingadb/Model/ServiceCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $service_id + * @property string $customvar_id + * @property string $environment_id + */ class ServiceCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/ServiceState.php b/library/Icingadb/Model/ServiceState.php index c5daa08cf..1d7dc31cd 100644 --- a/library/Icingadb/Model/ServiceState.php +++ b/library/Icingadb/Model/ServiceState.php @@ -7,6 +7,11 @@ use Icinga\Module\Icingadb\Common\ServiceStates; use ipl\Orm\Relations; +/** + * Service state model. + * + * @property string $service_id + */ class ServiceState extends State { public function getTableName() diff --git a/library/Icingadb/Model/Servicegroup.php b/library/Icingadb/Model/Servicegroup.php index 0da92fb4c..2e4b847b5 100644 --- a/library/Icingadb/Model/Servicegroup.php +++ b/library/Icingadb/Model/Servicegroup.php @@ -10,6 +10,16 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property ?string $zone_id + */ class Servicegroup extends Model { public function getTableName() diff --git a/library/Icingadb/Model/ServicegroupCustomvar.php b/library/Icingadb/Model/ServicegroupCustomvar.php index 23e536b51..01479eed9 100644 --- a/library/Icingadb/Model/ServicegroupCustomvar.php +++ b/library/Icingadb/Model/ServicegroupCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $servicegroup_id + * @property string $customvar_id + * @property string $environment_id + */ class ServicegroupCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/ServicegroupMember.php b/library/Icingadb/Model/ServicegroupMember.php index 5da537aa3..80a5054f3 100644 --- a/library/Icingadb/Model/ServicegroupMember.php +++ b/library/Icingadb/Model/ServicegroupMember.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $service_id + * @property string $servicegroup_id + * @property string $environment_id + */ class ServicegroupMember extends Model { public function getTableName() diff --git a/library/Icingadb/Model/ServicegroupSummary.php b/library/Icingadb/Model/ServicegroupSummary.php index 89a09539c..d66046704 100644 --- a/library/Icingadb/Model/ServicegroupSummary.php +++ b/library/Icingadb/Model/ServicegroupSummary.php @@ -13,6 +13,21 @@ use ipl\Sql\Expression; use ipl\Sql\Select; +/** + * @property string $id + * @property string $display_name + * @property string $name + * @property int $services_critical_handled + * @property int $services_critical_unhandled + * @property int $services_ok + * @property int $services_pending + * @property int $services_total + * @property int $services_unknown_handled + * @property int $services_unknown_unhandled + * @property int $services_warning_handled + * @property int $services_warning_unhandled + * @property int $services_severity + */ class ServicegroupSummary extends UnionModel { public static function on(Connection $db) diff --git a/library/Icingadb/Model/ServicestateSummary.php b/library/Icingadb/Model/ServicestateSummary.php index b1364f77f..daf3bec16 100644 --- a/library/Icingadb/Model/ServicestateSummary.php +++ b/library/Icingadb/Model/ServicestateSummary.php @@ -7,6 +7,24 @@ use ipl\Sql\Connection; use ipl\Sql\Expression; +/** + * @property int $services_acknowledged + * @property int $services_active_checks_enabled + * @property int $services_passive_checks_enabled + * @property int $services_critical_handled + * @property int $services_critical_unhandled + * @property int $services_event_handler_enabled + * @property int $services_flapping_enabled + * @property int $services_notifications_enabled + * @property int $services_ok + * @property int $services_pending + * @property int $services_problems_unacknowledged + * @property int $services_total + * @property int $services_unknown_handled + * @property int $services_unknown_unhandled + * @property int $services_warning_handled + * @property int $services_warning_unhandled + */ class ServicestateSummary extends Service { public function getSummaryColumns() diff --git a/library/Icingadb/Model/State.php b/library/Icingadb/Model/State.php index 2d242a855..4529c9b10 100644 --- a/library/Icingadb/Model/State.php +++ b/library/Icingadb/Model/State.php @@ -16,6 +16,7 @@ /** * Base class for the {@link HostState} and {@link ServiceState} models providing common columns. * + * @property string $id * @property string $environment_id The environment id * @property string $state_type The state type (hard or soft) * @property int $soft_state The current soft state code (0 = OK, 1 = WARNING, 2 = CRITICAL, 3 = UNKNOWN) @@ -44,9 +45,9 @@ * @property ?string $check_source The name of the node that executes the check * @property ?string $scheduling_source The name of the node that schedules the check * @property ?DateTime $last_update The time when the node was last updated - * @property ?DateTime $last_state_change The time when the node last got a status change - * @property ?DateTime $next_check The time when the node will execute the next check - * @property ?DateTime $next_update The time when the next check of the node is expected to end + * @property DateTime $last_state_change The time when the node last got a status change + * @property DateTime $next_check The time when the node will execute the next check + * @property DateTime $next_update The time when the next check of the node is expected to end */ abstract class State extends Model { diff --git a/library/Icingadb/Model/StateHistory.php b/library/Icingadb/Model/StateHistory.php index 9d80cb299..35d011527 100644 --- a/library/Icingadb/Model/StateHistory.php +++ b/library/Icingadb/Model/StateHistory.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Icingadb\Model; +use DateTime; use ipl\Orm\Behavior\Binary; use ipl\Orm\Behavior\MillisecondTimestamp; use ipl\Orm\Behaviors; @@ -15,6 +16,25 @@ * * Please note that using this model will fetch history entries for decommissioned services. To avoid this, * the query needs a `state_history.service_id IS NULL OR state_history_service.id IS NOT NULL` where. + * + * @property string $id + * @property string $environment_id + * @property ?string $endpoint_id + * @property string $object_type + * @property string $host_id + * @property ?string $service_id + * @property DateTime $event_time + * @property string $state_type + * @property int $soft_state + * @property int $hard_state + * @property int $check_attempt + * @property int $previous_soft_state + * @property int $previous_hard_state + * @property ?string $output + * @property ?string $long_output + * @property int $max_check_attempts + * @property ?string $check_source + * @property ?string $scheduling_source */ class StateHistory extends Model { diff --git a/library/Icingadb/Model/Timeperiod.php b/library/Icingadb/Model/Timeperiod.php index 26dd72222..e1664103b 100644 --- a/library/Icingadb/Model/Timeperiod.php +++ b/library/Icingadb/Model/Timeperiod.php @@ -10,6 +10,17 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property string $prefer_includes + * @property ?string $zone_id + */ class Timeperiod extends Model { public function getTableName() diff --git a/library/Icingadb/Model/TimeperiodCustomvar.php b/library/Icingadb/Model/TimeperiodCustomvar.php index 614a312f2..2931068a8 100644 --- a/library/Icingadb/Model/TimeperiodCustomvar.php +++ b/library/Icingadb/Model/TimeperiodCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $timeperiod_id + * @property string $customvar_id + * @property string $environment_id + */ class TimeperiodCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/TimeperiodOverrideExclude.php b/library/Icingadb/Model/TimeperiodOverrideExclude.php index c33df775e..2764dfb65 100644 --- a/library/Icingadb/Model/TimeperiodOverrideExclude.php +++ b/library/Icingadb/Model/TimeperiodOverrideExclude.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $timeperiod_id + * @property string $override_id + * @property string $environment_id + */ class TimeperiodOverrideExclude extends Model { public function getTableName() diff --git a/library/Icingadb/Model/TimeperiodOverrideInclude.php b/library/Icingadb/Model/TimeperiodOverrideInclude.php index 54185969b..b92e9eed2 100644 --- a/library/Icingadb/Model/TimeperiodOverrideInclude.php +++ b/library/Icingadb/Model/TimeperiodOverrideInclude.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $timeperiod_id + * @property string $override_id + * @property string $environment_id + */ class TimeperiodOverrideInclude extends Model { public function getTableName() diff --git a/library/Icingadb/Model/TimeperiodRange.php b/library/Icingadb/Model/TimeperiodRange.php index 62e87f8cf..af945735a 100644 --- a/library/Icingadb/Model/TimeperiodRange.php +++ b/library/Icingadb/Model/TimeperiodRange.php @@ -9,6 +9,13 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $timeperiod_id + * @property string $range_key + * @property string $environment_id + * @property string $range_value + */ class TimeperiodRange extends Model { public function getTableName() diff --git a/library/Icingadb/Model/User.php b/library/Icingadb/Model/User.php index 91d0d717e..1218de9e7 100644 --- a/library/Icingadb/Model/User.php +++ b/library/Icingadb/Model/User.php @@ -11,6 +11,22 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property string $email + * @property string $pager + * @property string $notifications_enabled + * @property ?string $timeperiod_id + * @property string[] $states + * @property string[] $types + * @property ?string $zone_id + */ class User extends Model { public function getTableName() diff --git a/library/Icingadb/Model/UserCustomvar.php b/library/Icingadb/Model/UserCustomvar.php index a702b6809..883858bfb 100644 --- a/library/Icingadb/Model/UserCustomvar.php +++ b/library/Icingadb/Model/UserCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $customvar_id + * @property string $user_id + * @property string $environment_id + */ class UserCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Usergroup.php b/library/Icingadb/Model/Usergroup.php index 34b0647b9..281c9ce58 100644 --- a/library/Icingadb/Model/Usergroup.php +++ b/library/Icingadb/Model/Usergroup.php @@ -10,6 +10,16 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $display_name + * @property ?string $zone_id + */ class Usergroup extends Model { public function getTableName() diff --git a/library/Icingadb/Model/UsergroupCustomvar.php b/library/Icingadb/Model/UsergroupCustomvar.php index ab97273b1..cdc79bcc1 100644 --- a/library/Icingadb/Model/UsergroupCustomvar.php +++ b/library/Icingadb/Model/UsergroupCustomvar.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $usergroup_id + * @property string $customvar_id + * @property string $environment_id + */ class UsergroupCustomvar extends Model { public function getTableName() diff --git a/library/Icingadb/Model/UsergroupMember.php b/library/Icingadb/Model/UsergroupMember.php index 7c61d6777..7abd5c820 100644 --- a/library/Icingadb/Model/UsergroupMember.php +++ b/library/Icingadb/Model/UsergroupMember.php @@ -9,6 +9,12 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $usergroup_id + * @property string $user_id + * @property string $environment_id + */ class UsergroupMember extends Model { public function getTableName() diff --git a/library/Icingadb/Model/Zone.php b/library/Icingadb/Model/Zone.php index aaf3bbfd3..04d63ce9d 100644 --- a/library/Icingadb/Model/Zone.php +++ b/library/Icingadb/Model/Zone.php @@ -9,6 +9,17 @@ use ipl\Orm\Model; use ipl\Orm\Relations; +/** + * @property string $id + * @property string $environment_id + * @property string $name_checksum + * @property string $properties_checksum + * @property string $name + * @property string $name_ci + * @property string $is_global + * @property ?string $parent_id + * @property int $depth + */ class Zone extends Model { public function getTableName() diff --git a/library/Icingadb/Widget/Detail/DowntimeCard.php b/library/Icingadb/Widget/Detail/DowntimeCard.php index 81f59dab7..8184479af 100644 --- a/library/Icingadb/Widget/Detail/DowntimeCard.php +++ b/library/Icingadb/Widget/Detail/DowntimeCard.php @@ -35,7 +35,7 @@ public function __construct(Downtime $downtime) $this->start = $this->downtime->scheduled_start_time->getTimestamp(); $this->end = $this->downtime->scheduled_end_time->getTimestamp(); - if ($this->downtime->end_time > $this->downtime->scheduled_end_time) { + if ($this->downtime->end_time && $this->downtime->end_time > $this->downtime->scheduled_end_time) { $this->duration = $this->downtime->end_time->getTimestamp() - $this->start; } else { $this->duration = $this->end - $this->start; diff --git a/library/Icingadb/Widget/Detail/EventDetail.php b/library/Icingadb/Widget/Detail/EventDetail.php index 181c9aead..aaf76082f 100644 --- a/library/Icingadb/Widget/Detail/EventDetail.php +++ b/library/Icingadb/Widget/Detail/EventDetail.php @@ -366,7 +366,7 @@ protected function assembleDowntimeEvent(DowntimeHistory $downtime) } $cancelInfo = []; - if ($downtime->has_been_cancelled) { + if ($downtime->has_been_cancelled && $downtime->cancel_time) { $cancelInfo = [ new HtmlElement('h2', null, Text::create(t('This downtime has been cancelled'))), new HorizontalKeyValue( @@ -430,7 +430,7 @@ protected function assembleCommentEvent(CommentHistory $comment) } $removedInfo = []; - if ($comment->has_been_removed) { + if ($comment->has_been_removed && $comment->remove_time) { $removedInfo[] = new HtmlElement('h2', null, Text::create(t('This comment has been removed'))); if ($comment->removed_by) { $removedInfo[] = new HorizontalKeyValue( @@ -487,7 +487,7 @@ protected function assembleFlappingEvent(FlappingHistory $flapping) $flapping->percent_state_change_start, $flapping->flapping_threshold_high )); - } else { + } elseif ($flapping->end_time !== null) { $eventInfo[] = new HorizontalKeyValue( t('Ended on'), DateFormatter::formatDateTime($flapping->end_time->getTimestamp()) @@ -567,7 +567,7 @@ protected function assembleAcknowledgeEvent(AcknowledgementHistory $acknowledgem if ($acknowledgement->cleared_by) { $eventInfo[] = new HorizontalKeyValue( t('Cleared by'), - [new Icon('user', $acknowledgement->cleared_by)] + [new Icon('user'), $acknowledgement->cleared_by] ); } else { $expired = false; diff --git a/library/Icingadb/Widget/HostSummaryDonut.php b/library/Icingadb/Widget/HostSummaryDonut.php index db5fef8c5..5efcf74d0 100644 --- a/library/Icingadb/Widget/HostSummaryDonut.php +++ b/library/Icingadb/Widget/HostSummaryDonut.php @@ -47,7 +47,7 @@ protected function assembleBody(BaseHtmlElement $body) ->addSlice($this->summary->hosts_down_handled, ['class' => 'slice-state-critical-handled']) ->addSlice($this->summary->hosts_down_unhandled, ['class' => 'slice-state-critical']) ->addSlice($this->summary->hosts_pending, ['class' => 'slice-state-pending']) - ->setLabelBig($this->summary->hosts_down_unhandled) + ->setLabelBig((string) $this->summary->hosts_down_unhandled) ->setLabelBigUrl(Links::hosts()->setFilter($labelBigUrlFilter)->addParams([ 'sort' => 'host.state.last_state_change' ])) diff --git a/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php b/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php index 7ebc1f6dc..dedaa7215 100644 --- a/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php +++ b/library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php @@ -56,7 +56,11 @@ abstract class BaseDowntimeListItem extends BaseListItem protected function init(): void { - if ($this->item->is_flexible && $this->item->is_in_effect) { + if ( + isset($this->item->start_time, $this->item->end_time) + && $this->item->is_flexible + && $this->item->is_in_effect + ) { $this->startTime = $this->item->start_time->getTimestamp(); $this->endTime = $this->item->end_time->getTimestamp(); } else { diff --git a/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php b/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php index c56a1f8f6..b3099c802 100644 --- a/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php +++ b/library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php @@ -5,7 +5,7 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; use Icinga\Module\Icingadb\Common\Links; -use Icinga\Module\Icingadb\Model\Hostgroup; +use Icinga\Module\Icingadb\Model\Hostgroupsummary; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; @@ -18,7 +18,7 @@ /** * Hostgroup item of a hostgroup list. Represents one database row. * - * @property Hostgroup $item + * @property Hostgroupsummary $item * @property HostgroupTable $table */ abstract class BaseHostGroupItem extends BaseTableRowItem diff --git a/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php b/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php index 7bee532ef..24f0beaae 100644 --- a/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php +++ b/library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php @@ -5,7 +5,7 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; use Icinga\Module\Icingadb\Common\Links; -use Icinga\Module\Icingadb\Model\Servicegroup; +use Icinga\Module\Icingadb\Model\ServicegroupSummary; use ipl\Html\Attributes; use ipl\Html\BaseHtmlElement; use ipl\Html\HtmlElement; @@ -18,7 +18,7 @@ /** * Servicegroup item of a servicegroup list. Represents one database row. * - * @property Servicegroup $item + * @property ServicegroupSummary $item * @property ServicegroupTable $table */ abstract class BaseServiceGroupItem extends BaseTableRowItem diff --git a/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php b/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php index 6aa61c271..cb3f06a9a 100644 --- a/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php +++ b/library/Icingadb/Widget/ItemTable/HostgroupTableRow.php @@ -4,7 +4,7 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Model\Hostgroup; +use Icinga\Module\Icingadb\Model\Hostgroupsummary; use Icinga\Module\Icingadb\Widget\Detail\HostStatistics; use Icinga\Module\Icingadb\Widget\Detail\ServiceStatistics; use ipl\Html\BaseHtmlElement; @@ -13,7 +13,7 @@ /** * Hostgroup table row of a hostgroup table. Represents one database row. * - * @property Hostgroup $item + * @property Hostgroupsummary $item * @property HostgroupTable $table */ class HostgroupTableRow extends BaseHostGroupItem diff --git a/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php b/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php index 3dea4c1e5..e34c029ff 100644 --- a/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php +++ b/library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php @@ -4,7 +4,7 @@ namespace Icinga\Module\Icingadb\Widget\ItemTable; -use Icinga\Module\Icingadb\Model\Servicegroup; +use Icinga\Module\Icingadb\Model\ServicegroupSummary; use Icinga\Module\Icingadb\Widget\Detail\ServiceStatistics; use ipl\Html\BaseHtmlElement; use ipl\Stdlib\Filter; @@ -12,7 +12,7 @@ /** * Servicegroup item of a servicegroup list. Represents one database row. * - * @property Servicegroup $item + * @property ServicegroupSummary $item * @property ServicegroupTable $table */ class ServicegroupTableRow extends BaseServiceGroupItem diff --git a/library/Icingadb/Widget/ServiceSummaryDonut.php b/library/Icingadb/Widget/ServiceSummaryDonut.php index e806fba0f..e6b38a103 100644 --- a/library/Icingadb/Widget/ServiceSummaryDonut.php +++ b/library/Icingadb/Widget/ServiceSummaryDonut.php @@ -50,7 +50,7 @@ protected function assembleBody(BaseHtmlElement $body) ->addSlice($this->summary->services_unknown_handled, ['class' => 'slice-state-unknown-handled']) ->addSlice($this->summary->services_unknown_unhandled, ['class' => 'slice-state-unknown']) ->addSlice($this->summary->services_pending, ['class' => 'slice-state-pending']) - ->setLabelBig($this->summary->services_critical_unhandled) + ->setLabelBig((string) $this->summary->services_critical_unhandled) ->setLabelBigUrl(Links::services()->setFilter($labelBigUrlFilter)->addParams([ 'sort' => 'service.state.last_state_change' ])) diff --git a/phpstan-baseline-7x.neon b/phpstan-baseline-7x.neon new file mode 100644 index 000000000..06d60bdcb --- /dev/null +++ b/phpstan-baseline-7x.neon @@ -0,0 +1,146 @@ +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 \\#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\\\\|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 diff --git a/phpstan-baseline-8x.neon b/phpstan-baseline-8x.neon new file mode 100644 index 000000000..98c0c79c8 --- /dev/null +++ b/phpstan-baseline-8x.neon @@ -0,0 +1,141 @@ +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 \\#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\\\\|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 diff --git a/phpstan-baseline-by-php-version.php b/phpstan-baseline-by-php-version.php new file mode 100644 index 000000000..4bd791e86 --- /dev/null +++ b/phpstan-baseline-by-php-version.php @@ -0,0 +1,12 @@ += 80000) { + $includes[] = __DIR__ . '/phpstan-baseline-8x.neon'; +} else { + $includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; +} + +return [ + 'includes' => $includes +]; diff --git a/phpstan-baseline.neon b/phpstan-baseline-standard.neon similarity index 94% rename from phpstan-baseline.neon rename to phpstan-baseline-standard.neon index 262245dec..192bde03f 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline-standard.neon @@ -330,11 +330,6 @@ parameters: count: 1 path: application/controllers/EventController.php - - - message: "#^Parameter \\#1 \\$string of function hex2bin expects string, mixed given\\.$#" - count: 1 - path: application/controllers/EventController.php - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Controllers\\\\EventController\\:\\:\\$event \\(Icinga\\\\Module\\\\Icingadb\\\\Model\\\\History\\) does not accept ipl\\\\Orm\\\\Model\\|null\\.$#" count: 1 @@ -495,11 +490,6 @@ parameters: count: 1 path: application/controllers/HostController.php - - - message: "#^Parameter \\#1 \\$title of method ipl\\\\Web\\\\Compat\\\\CompatController\\:\\:setTitle\\(\\) expects string, mixed given\\.$#" - count: 1 - path: application/controllers/HostController.php - - message: "#^Parameter \\#2 \\$apiResult of class Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\HostInspectionDetail constructor expects array, mixed given\\.$#" count: 1 @@ -522,7 +512,7 @@ parameters: - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 4 + count: 1 path: application/controllers/HostController.php - @@ -557,7 +547,7 @@ parameters: - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 + count: 1 path: application/controllers/HostgroupController.php - @@ -917,7 +907,7 @@ parameters: - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 4 + count: 2 path: application/controllers/ServiceController.php - @@ -952,7 +942,7 @@ parameters: - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 + count: 1 path: application/controllers/ServicegroupController.php - @@ -1365,11 +1355,6 @@ parameters: count: 1 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/AcknowledgeProblemForm.php - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#" count: 1 @@ -1395,26 +1380,11 @@ parameters: count: 1 path: application/forms/Command/Object/AddCommentForm.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: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#" count: 1 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/DeleteCommentForm.php - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 1 @@ -1430,11 +1400,6 @@ parameters: count: 1 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/DeleteDowntimeForm.php - - message: "#^Cannot access property \\$passive_checks_enabled on mixed\\.$#" count: 1 @@ -1465,11 +1430,6 @@ parameters: count: 1 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/ProcessCheckResultForm.php - - message: "#^Cannot call method getUsername\\(\\) on Icinga\\\\User\\|null\\.$#" count: 1 @@ -1480,11 +1440,6 @@ parameters: count: 1 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/RemoveAcknowledgementForm.php - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#" count: 1 @@ -1500,11 +1455,6 @@ parameters: count: 1 path: application/forms/Command/Object/ScheduleCheckForm.php - - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" - count: 2 - path: application/forms/Command/Object/ScheduleCheckForm.php - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#" count: 2 @@ -1535,11 +1485,6 @@ parameters: count: 3 path: application/forms/Command/Object/ScheduleHostDowntimeForm.php - - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" - count: 1 - path: application/forms/Command/Object/ScheduleHostDowntimeForm.php - - message: "#^Call to an undefined method ipl\\\\Html\\\\Contract\\\\FormElement\\:\\:isChecked\\(\\)\\.$#" count: 1 @@ -1570,11 +1515,6 @@ parameters: count: 3 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/ScheduleServiceDowntimeForm.php - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Forms\\\\Command\\\\Object\\\\ScheduleServiceDowntimeForm\\:\\:\\$flexibleEnd has no type specified\\.$#" count: 1 @@ -1600,11 +1540,6 @@ parameters: count: 1 path: application/forms/Command/Object/SendCustomNotificationForm.php - - - message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, mixed given\\.$#" - count: 2 - path: application/forms/Command/Object/SendCustomNotificationForm.php - - message: "#^Cannot call method getAttributes\\(\\) on ipl\\\\Html\\\\Contract\\\\Wrappable\\|null\\.$#" count: 1 @@ -1835,11 +1770,6 @@ parameters: count: 1 path: application/forms/RedisConfigForm.php - - - message: "#^Parameter \\#1 \\$string of function md5 expects string, mixed given\\.$#" - count: 1 - path: application/forms/RedisConfigForm.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" count: 1 @@ -2005,11 +1935,6 @@ parameters: count: 2 path: library/Icingadb/Command/Renderer/IcingaApiCommandRenderer.php - - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Command/Renderer/IcingaApiCommandRenderer.php - - message: "#^Cannot access offset 'code' on mixed\\.$#" count: 1 @@ -2040,16 +1965,6 @@ parameters: count: 1 path: library/Icingadb/Command/Transport/ApiCommandTransport.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: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Command\\\\Transport\\\\CommandTransportConfig\\:\\:\\$configs type has no value type specified in iterable type array\\.$#" count: 1 @@ -2115,11 +2030,6 @@ parameters: count: 1 path: library/Icingadb/Common/IcingaRedis.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" - count: 1 - path: library/Icingadb/Common/IcingaRedis.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\Links\\:\\:hostgroup\\(\\) has parameter \\$hostgroup with no type specified\\.$#" count: 1 @@ -2130,11 +2040,6 @@ parameters: count: 1 path: library/Icingadb/Common/Links.php - - - message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Common/Links.php - - message: "#^Call to an undefined method Predis\\\\Client\\:\\:hGet\\(\\)\\.$#" count: 1 @@ -2215,21 +2120,11 @@ parameters: count: 1 path: library/Icingadb/Common/ObjectInspectionDetail.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 \\$content of static method ipl\\\\Html\\\\Table\\:\\:td\\(\\) expects array\\|ipl\\\\Html\\\\Html\\|string\\|null, 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: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Common\\\\ObjectInspectionDetail\\:\\:\\$attrs type has no value type specified in iterable type array\\.$#" count: 1 @@ -2380,11 +2275,6 @@ parameters: count: 1 path: library/Icingadb/Compat/CompatHost.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Compat\\\\CompatHost\\:\\:getBoolType\\(\\) never returns null so it can be removed from the return type\\.$#" - count: 1 - path: library/Icingadb/Compat/CompatHost.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Compat\\\\CompatHost\\:\\:getName\\(\\) should return string but returns mixed\\.$#" count: 1 @@ -2610,11 +2500,6 @@ parameters: count: 1 path: library/Icingadb/Compat/CompatService.php - - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Compat\\\\CompatService\\:\\:getBoolType\\(\\) never returns null so it can be removed from the return type\\.$#" - count: 1 - path: library/Icingadb/Compat/CompatService.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Compat\\\\CompatService\\:\\:getHost\\(\\) should return Icinga\\\\Module\\\\Icingadb\\\\Compat\\\\CompatHost but returns Icinga\\\\Module\\\\Monitoring\\\\Object\\\\Host\\.$#" count: 1 @@ -2825,11 +2710,6 @@ parameters: count: 1 path: library/Icingadb/Compat/UrlMigrator.php - - - message: "#^Parameter \\#1 \\$string of function strtolower expects string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Compat/UrlMigrator.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Data\\\\CsvResultSet\\:\\:extractKeysAndValues\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -2840,16 +2720,6 @@ parameters: count: 1 path: library/Icingadb/Data/CsvResultSet.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 \\#1 \\$key of method Icinga\\\\Module\\\\Icingadb\\\\Data\\\\CsvResultSet\\:\\:formatValue\\(\\) expects string, mixed given\\.$#" count: 1 @@ -2900,11 +2770,6 @@ parameters: count: 1 path: library/Icingadb/Data/PivotTable.php - - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Data/PivotTable.php - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Data\\\\PivotTable\\:\\:\\$gridcols type has no value type specified in iterable type array\\.$#" count: 1 @@ -3100,11 +2965,6 @@ parameters: count: 1 path: library/Icingadb/Model/Behavior/ActionAndNoteUrl.php - - - message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Model/Behavior/ActionAndNoteUrl.php - - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 1 @@ -3385,11 +3245,6 @@ parameters: count: 1 path: library/Icingadb/Model/CustomvarFlat.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\\\|false given\\.$#" - count: 1 - path: library/Icingadb/Model/CustomvarFlat.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Downtime\\:\\:createBehaviors\\(\\) has no return type specified\\.$#" count: 1 @@ -4385,11 +4240,6 @@ parameters: count: 3 path: library/Icingadb/ProvidedHook/ApplicationState.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/ProvidedHook/CreateHostSlaReport.php - - message: "#^Parameter \\#1 \\$rule of static method ipl\\\\Web\\\\Filter\\\\QueryString\\:\\:render\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 @@ -4400,11 +4250,6 @@ parameters: count: 1 path: library/Icingadb/ProvidedHook/CreateServiceSlaReport.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/ProvidedHook/CreateServiceSlaReport.php - - message: "#^Parameter \\#1 \\$rule of static method ipl\\\\Web\\\\Filter\\\\QueryString\\:\\:render\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 @@ -4420,11 +4265,6 @@ parameters: count: 1 path: library/Icingadb/ProvidedHook/IcingaHealth.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 3 - path: library/Icingadb/ProvidedHook/IcingaHealth.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\ProvidedHook\\\\IcingaHealth\\:\\:getInstance\\(\\) should return Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Instance\\|null but returns ipl\\\\Orm\\\\Model\\|null\\.$#" count: 1 @@ -4595,11 +4435,6 @@ parameters: count: 1 path: library/Icingadb/ProvidedHook/Reporting/SlaReport.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 \\#2 \\$array of function join expects array\\, array\\ given\\.$#" count: 1 @@ -4805,11 +4640,6 @@ parameters: count: 3 path: library/Icingadb/Redis/VolatileStateResults.php - - - message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Redis/VolatileStateResults.php - - message: "#^Parameter \\#2 \\$array of function join expects array\\, array\\ given\\.$#" count: 1 @@ -5030,11 +4860,6 @@ parameters: count: 1 path: library/Icingadb/Util/PerfData.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 \\$value of method Icinga\\\\Module\\\\Icingadb\\\\Util\\\\ThresholdRange\\:\\:contains\\(\\) expects float, float\\|null given\\.$#" count: 2 @@ -5230,11 +5055,6 @@ parameters: count: 1 path: library/Icingadb/Util/PluginOutput.php - - - message: "#^Parameter \\#1 \\$name of method Icinga\\\\Module\\\\Icingadb\\\\Util\\\\PluginOutput\\:\\:setCommandName\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Util/PluginOutput.php - - message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|null given\\.$#" count: 1 @@ -5250,11 +5070,6 @@ parameters: count: 2 path: library/Icingadb/Util/PluginOutput.php - - - message: "#^Parameter \\#1 \\$string of function trim expects string, string\\|null given\\.$#" - count: 1 - path: library/Icingadb/Util/PluginOutput.php - - message: "#^Parameter \\#2 \\$subject of function preg_match expects string, string\\|null given\\.$#" count: 1 @@ -5615,21 +5430,11 @@ parameters: count: 3 path: library/Icingadb/Web/Controller.php - - - message: "#^Parameter \\#1 \\$string of function trim expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Web/Controller.php - - message: "#^Parameter \\#2 \\$array of function join expects array\\, array\\ 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 - - message: "#^Parameter \\#2 \\$tableName of method ipl\\\\Orm\\\\Resolver\\:\\:qualifyColumn\\(\\) expects string, int\\\\|int\\<1, max\\>\\|string given\\.$#" count: 4 @@ -6090,11 +5895,6 @@ parameters: count: 1 path: library/Icingadb/Widget/Detail/CustomVarTable.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 3 - path: library/Icingadb/Widget/Detail/DowntimeCard.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\DowntimeCard\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -6185,11 +5985,6 @@ parameters: count: 3 path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 5 - path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - message: "#^Cannot call method isUnrestricted\\(\\) on Icinga\\\\User\\|null\\.$#" count: 4 @@ -6230,11 +6025,6 @@ parameters: count: 3 path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - - message: "#^Parameter \\#1 \\$text of class Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\MarkdownText constructor expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - message: "#^Parameter \\#2 \\$array of function join expects array\\, array\\ given\\.$#" count: 1 @@ -6250,11 +6040,6 @@ parameters: count: 2 path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 5 - path: library/Icingadb/Widget/Detail/DowntimeDetail.php - - message: "#^Argument of an invalid type array\\|null supplied for foreach, only iterables are supported\\.$#" count: 1 @@ -6320,11 +6105,6 @@ parameters: count: 3 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 21 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Cannot call method isUnrestricted\\(\\) on Icinga\\\\User\\|null\\.$#" count: 4 @@ -6400,11 +6180,6 @@ parameters: count: 1 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Parameter \\#1 \\$content of class Icinga\\\\Module\\\\Icingadb\\\\Util\\\\PluginOutput constructor expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Parameter \\#1 \\$denylist of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\EventDetail\\:\\:parseDenylist\\(\\) expects string, array\\ given\\.$#" count: 2 @@ -6430,41 +6205,16 @@ parameters: count: 3 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Parameter \\#1 \\$state of static method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\HostStates\\:\\:text\\(\\) expects int\\|null, mixed given\\.$#" - count: 6 - path: library/Icingadb/Widget/Detail/EventDetail.php - - - - message: "#^Parameter \\#1 \\$state of static method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\ServiceStates\\:\\:text\\(\\) expects int\\|null, mixed given\\.$#" - count: 6 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Parameter \\#1 \\$stateChange of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\EventDetail\\:\\:assembleStateChangeEvent\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\StateHistory, mixed given\\.$#" count: 1 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/EventDetail.php - - - - message: "#^Parameter \\#1 \\$subject of static method ipl\\\\Stdlib\\\\Str\\:\\:camel\\(\\) expects string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Parameter \\#2 \\$array of function join expects array\\, array\\ given\\.$#" count: 1 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Parameter \\#2 \\$attributes of class ipl\\\\Web\\\\Widget\\\\Icon constructor expects array\\|ipl\\\\Html\\\\Attributes\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Parameter \\#2 \\$tableName of method ipl\\\\Orm\\\\Resolver\\:\\:qualifyColumn\\(\\) expects string, int\\\\|int\\<1, max\\>\\|string given\\.$#" count: 4 @@ -6475,21 +6225,6 @@ parameters: count: 2 path: library/Icingadb/Widget/Detail/EventDetail.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 5 - path: library/Icingadb/Widget/Detail/EventDetail.php - - - - message: "#^Parameter \\#3 \\$number of function tp expects int\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/EventDetail.php - - - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 3 - path: library/Icingadb/Widget/Detail/EventDetail.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\HostDetail\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -6960,11 +6695,6 @@ parameters: count: 2 path: library/Icingadb/Widget/Detail/QuickActions.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/QuickActions.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\ServiceDetail\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -7110,16 +6840,6 @@ parameters: count: 3 path: library/Icingadb/Widget/Detail/UserDetail.php - - - message: "#^Parameter \\#1 \\$states of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\UserDetail\\:\\:separateStates\\(\\) expects array, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/UserDetail.php - - - - message: "#^Parameter \\#1 \\$types of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\Detail\\\\UserDetail\\:\\:localizeTypes\\(\\) expects array, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/Detail/UserDetail.php - - message: "#^Parameter \\#2 \\$array of function join expects array\\, array\\ given\\.$#" count: 1 @@ -7265,11 +6985,6 @@ parameters: count: 1 path: library/Icingadb/Widget/HostStatusBar.php - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: library/Icingadb/Widget/HostSummaryDonut.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\HostSummaryDonut\\:\\:assembleBody\\(\\) has no return type specified\\.$#" count: 1 @@ -7285,16 +7000,6 @@ parameters: count: 1 path: library/Icingadb/Widget/HostSummaryDonut.php - - - message: "#^Parameter \\#1 \\$data of method Icinga\\\\Chart\\\\Donut\\:\\:addSlice\\(\\) expects int, mixed given\\.$#" - count: 4 - path: library/Icingadb/Widget/HostSummaryDonut.php - - - - message: "#^Parameter \\#1 \\$labelBig of method Icinga\\\\Chart\\\\Donut\\:\\:setLabelBig\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/HostSummaryDonut.php - - message: "#^Parameter \\#1 \\$rule of method ipl\\\\Stdlib\\\\Filter\\\\Chain\\:\\:add\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 @@ -7305,11 +7010,6 @@ parameters: count: 1 path: library/Icingadb/Widget/IconImage.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Cannot access property \\$host on mixed\\.$#" count: 1 @@ -7320,21 +7020,11 @@ parameters: count: 3 path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Parameter \\#1 \\$host of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseCommentListItem\\:\\:createHostLink\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host, mixed given\\.$#" count: 1 @@ -7345,16 +7035,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseCommentListItem.php - - message: "#^Cannot access property \\$host on mixed\\.$#" count: 1 @@ -7365,21 +7045,11 @@ parameters: count: 3 path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 5 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - message: "#^Parameter \\#1 \\$host of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:createHostLink\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host, mixed given\\.$#" count: 1 @@ -7390,11 +7060,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemList/BaseDowntimeListItem.php - - message: "#^Property Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseDowntimeListItem\\:\\:\\$duration \\(int\\) does not accept string\\.$#" count: 1 @@ -7550,11 +7215,6 @@ parameters: count: 3 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Cannot call method getTimestamp\\(\\) on mixed\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:createTicketLinks\\(\\) has parameter \\$text with no type specified\\.$#" count: 1 @@ -7570,31 +7230,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - - message: "#^Parameter \\#1 \\$string of function ucfirst expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - message: "#^Parameter \\#2 \\$host of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\BaseHistoryListItem\\:\\:createServiceLink\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host, object given\\.$#" count: 1 path: library/Icingadb/Widget/ItemList/BaseHistoryListItem.php - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseHostListItem.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemList/BaseHostListItem.php - - message: "#^Access to an undefined property object\\:\\:\\$author\\.$#" count: 1 @@ -7675,11 +7315,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - message: "#^Parameter \\#1 \\$host of static method Icinga\\\\Module\\\\Icingadb\\\\Common\\\\Links\\:\\:host\\(\\) expects Icinga\\\\Module\\\\Icingadb\\\\Model\\\\Host, mixed given\\.$#" count: 1 @@ -7690,11 +7325,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemList/BaseServiceListItem.php - - message: "#^Access to an undefined property object\\:\\:\\$name\\.$#" count: 7 @@ -7750,11 +7380,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/HostListItemDetailed.php - - message: "#^Parameter \\#2 \\$value of method Icinga\\\\Web\\\\Url\\:\\:setParam\\(\\) expects array\\|bool\\|string, int given\\.$#" count: 1 @@ -7795,11 +7420,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/ServiceListItemDetailed.php - - message: "#^Access to an undefined property object\\:\\:\\$icon_image_alt\\.$#" count: 1 @@ -7815,11 +7435,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/StateListItem.php - - - message: "#^Cannot call method getTimestamp\\(\\) on DateTime\\|null\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemList/StateListItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemList\\\\StateListItem\\:\\:createSubject\\(\\) has no return type specified\\.$#" count: 1 @@ -7830,36 +7445,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemList/StateListItem.php - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseHostGroupItem.php - - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/BaseServiceGroupItem.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\BaseStateRowItem\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -7920,41 +7505,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/HostRowItem.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/HostRowItem.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 5 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - - message: "#^Parameter \\#3 \\$number of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\BaseHostGroupItem\\:\\:translatePlural\\(\\) expects int\\|null, mixed given\\.$#" - count: 4 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 4 - path: library/Icingadb/Widget/ItemTable/HostgroupGridCell.php - - message: "#^Parameter \\#1 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 2 path: library/Icingadb/Widget/ItemTable/HostgroupTableRow.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/HostgroupTableRow.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 2 @@ -8000,41 +7555,11 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/ServiceRowItem.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 2 - path: library/Icingadb/Widget/ItemTable/ServiceRowItem.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - - message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 9 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - - message: "#^Parameter \\#3 \\$number of method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ItemTable\\\\BaseServiceGroupItem\\:\\:translatePlural\\(\\) expects int\\|null, mixed given\\.$#" - count: 8 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - - - message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" - count: 8 - path: library/Icingadb/Widget/ItemTable/ServicegroupGridCell.php - - message: "#^Parameter \\#1 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 path: library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/ServicegroupTableRow.php - - message: "#^Parameter \\#2 \\.\\.\\.\\$rules of static method ipl\\\\Stdlib\\\\Filter\\:\\:all\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 @@ -8210,36 +7735,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ItemTable/StateRowItem.php - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 3 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UserTableRow.php - - - - message: "#^Cannot access offset 0 on mixed\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - - message: "#^Parameter \\#1 \\$content of static method ipl\\\\Html\\\\Text\\:\\:create\\(\\) expects string, mixed given\\.$#" - count: 3 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - - - message: "#^Parameter \\#2 \\$value of static method ipl\\\\Stdlib\\\\Filter\\:\\:equal\\(\\) expects array\\|bool\\|float\\|int\\|string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ItemTable/UsergroupTableRow.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ServiceStateBadges\\:\\:assemble\\(\\) has no return type specified\\.$#" count: 1 @@ -8255,11 +7750,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ServiceStatusBar.php - - - message: "#^Cannot cast mixed to int\\.$#" - count: 1 - path: library/Icingadb/Widget/ServiceSummaryDonut.php - - message: "#^Method Icinga\\\\Module\\\\Icingadb\\\\Widget\\\\ServiceSummaryDonut\\:\\:assembleBody\\(\\) has no return type specified\\.$#" count: 1 @@ -8275,16 +7765,6 @@ parameters: count: 1 path: library/Icingadb/Widget/ServiceSummaryDonut.php - - - message: "#^Parameter \\#1 \\$data of method Icinga\\\\Chart\\\\Donut\\:\\:addSlice\\(\\) expects int, mixed given\\.$#" - count: 8 - path: library/Icingadb/Widget/ServiceSummaryDonut.php - - - - message: "#^Parameter \\#1 \\$labelBig of method Icinga\\\\Chart\\\\Donut\\:\\:setLabelBig\\(\\) expects string, mixed given\\.$#" - count: 1 - path: library/Icingadb/Widget/ServiceSummaryDonut.php - - message: "#^Parameter \\#1 \\$rule of method ipl\\\\Stdlib\\\\Filter\\\\Chain\\:\\:add\\(\\) expects ipl\\\\Stdlib\\\\Filter\\\\Rule, ipl\\\\Stdlib\\\\Filter\\\\Rule\\|null given\\.$#" count: 1 diff --git a/phpstan.neon b/phpstan.neon index 4cfb7e5e3..5b8c6e846 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,6 @@ includes: - - phpstan-baseline.neon + - phpstan-baseline-standard.neon + - phpstan-baseline-by-php-version.php parameters: level: max @@ -13,7 +14,9 @@ parameters: - library scanDirectories: - - vendor + - /icingaweb2 + - /usr/share/icinga-php + - /usr/share/icingaweb2-modules ignoreErrors: -