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);
|
return gettype($var);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->value;
|
return $this->value;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace Icinga\Module\Director\Db\Branch;
|
namespace Icinga\Module\Director\Db\Branch;
|
||||||
|
|
||||||
|
use gipfl\Translation\StaticTranslator;
|
||||||
use gipfl\Translation\TranslationHelper;
|
use gipfl\Translation\TranslationHelper;
|
||||||
use Icinga\Module\Director\Db;
|
use Icinga\Module\Director\Db;
|
||||||
use ipl\Html\Html;
|
use ipl\Html\Html;
|
||||||
@ -56,7 +57,7 @@ class BranchModificationInspection
|
|||||||
|
|
||||||
public static function describeModificationStatistics($stats)
|
public static function describeModificationStatistics($stats)
|
||||||
{
|
{
|
||||||
$t = TranslationHelper::getTranslator();
|
$t = StaticTranslator::get();
|
||||||
$relevantStats = [];
|
$relevantStats = [];
|
||||||
if ($stats->cnt_created > 0) {
|
if ($stats->cnt_created > 0) {
|
||||||
$relevantStats[] = sprintf($t->translate('%d created'), $stats->cnt_created);
|
$relevantStats[] = sprintf($t->translate('%d created'), $stats->cnt_created);
|
||||||
|
@ -27,11 +27,13 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
|||||||
$this->object = $object;
|
$this->object = $object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function count()
|
public function count()
|
||||||
{
|
{
|
||||||
return count($this->ranges);
|
return count($this->ranges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function rewind()
|
public function rewind()
|
||||||
{
|
{
|
||||||
$this->position = 0;
|
$this->position = 0;
|
||||||
@ -42,6 +44,7 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
|||||||
return $this->modified;
|
return $this->modified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function current()
|
public function current()
|
||||||
{
|
{
|
||||||
if (! $this->valid()) {
|
if (! $this->valid()) {
|
||||||
@ -51,16 +54,19 @@ class IcingaScheduledDowntimeRanges implements Iterator, Countable, IcingaConfig
|
|||||||
return $this->ranges[$this->idx[$this->position]];
|
return $this->ranges[$this->idx[$this->position]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function key()
|
public function key()
|
||||||
{
|
{
|
||||||
return $this->idx[$this->position];
|
return $this->idx[$this->position];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function next()
|
public function next()
|
||||||
{
|
{
|
||||||
++$this->position;
|
++$this->position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
return array_key_exists($this->position, $this->idx);
|
return array_key_exists($this->position, $this->idx);
|
||||||
|
@ -212,6 +212,7 @@ abstract class QuickTable implements Paginatable, ValidHtml
|
|||||||
return $paginator;
|
return $paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function count()
|
public function count()
|
||||||
{
|
{
|
||||||
$db = $this->db();
|
$db = $this->db();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user