mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-10 17:20:02 -04:00
ServiceStates: Param $state may be null
This commit is contained in:
parent
94630c46fd
commit
4bd701da2e
1 changed files with 4 additions and 4 deletions
|
|
@ -56,13 +56,13 @@ class ServiceStates
|
|||
/**
|
||||
* Get the textual representation of the passed service state
|
||||
*
|
||||
* @param int $state
|
||||
* @param int|null $state
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \InvalidArgumentException If the given service state is invalid, i.e. not known
|
||||
*/
|
||||
public static function text(int $state): string
|
||||
public static function text(int $state = null): string
|
||||
{
|
||||
switch (true) {
|
||||
case $state === self::OK:
|
||||
|
|
@ -93,13 +93,13 @@ class ServiceStates
|
|||
/**
|
||||
* Get the translated textual representation of the passed service state
|
||||
*
|
||||
* @param int $state
|
||||
* @param int|null $state
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \InvalidArgumentException If the given service state is invalid, i.e. not known
|
||||
*/
|
||||
public static function translated(int $state): string
|
||||
public static function translated(int $state = null): string
|
||||
{
|
||||
switch (true) {
|
||||
case $state === self::OK:
|
||||
|
|
|
|||
Loading…
Reference in a new issue