mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
monitoring: Remove unnecessary break after throwing an exception
This commit is contained in:
parent
d9194c2696
commit
eb9fe0966b
@ -164,6 +164,7 @@ class Host extends MonitoredObject
|
|||||||
*/
|
*/
|
||||||
public static function getStateText($state, $translate = false)
|
public static function getStateText($state, $translate = false)
|
||||||
{
|
{
|
||||||
|
$translate = (bool) $translate;
|
||||||
switch ((int) $state) {
|
switch ((int) $state) {
|
||||||
case self::STATE_UP:
|
case self::STATE_UP:
|
||||||
$text = $translate ? mt('monitoring', 'up') : 'up';
|
$text = $translate ? mt('monitoring', 'up') : 'up';
|
||||||
@ -179,7 +180,6 @@ class Host extends MonitoredObject
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new InvalidArgumentException('Invalid host state \'%s\'', $state);
|
throw new InvalidArgumentException('Invalid host state \'%s\'', $state);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user