mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
library: some hints for PHP 8.1
This commit is contained in:
parent
b7c0559212
commit
215988c3ca
@ -82,6 +82,7 @@ class SerializableValue implements Serializable
|
||||
return gettype($var);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->value;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Icinga\Module\Director\Db\Branch;
|
||||
|
||||
use gipfl\Translation\StaticTranslator;
|
||||
use gipfl\Translation\TranslationHelper;
|
||||
use Icinga\Module\Director\Db;
|
||||
use ipl\Html\Html;
|
||||
@ -56,7 +57,7 @@ class BranchModificationInspection
|
||||
|
||||
public static function describeModificationStatistics($stats)
|
||||
{
|
||||
$t = TranslationHelper::getTranslator();
|
||||
$t = StaticTranslator::get();
|
||||
$relevantStats = [];
|
||||
if ($stats->cnt_created > 0) {
|
||||
$relevantStats[] = sprintf($t->translate('%d created'), $stats->cnt_created);
|
||||
|
@ -27,11 +27,13 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
||||
$this->object = $object;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
return count($this->ranges);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
$this->position = 0;
|
||||
@ -42,6 +44,7 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
||||
return $this->modified;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function current()
|
||||
{
|
||||
if (! $this->valid()) {
|
||||
@ -51,16 +54,19 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
||||
return $this->ranges[$this->idx[$this->position]];
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function key()
|
||||
{
|
||||
return $this->idx[$this->position];
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
++$this->position;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function valid()
|
||||
{
|
||||
return array_key_exists($this->position, $this->idx);
|
||||
|
@ -212,6 +212,7 @@ abstract class QuickTable implements Paginatable, ValidHtml
|
||||
return $paginator;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
$db = $this->db();
|
||||
|
Loading…
x
Reference in New Issue
Block a user