Skip to content

Commit

Permalink
monitoring: Remove unnecessary break after throwing an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 29, 2014
1 parent d9194c2 commit eb9fe09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/monitoring/library/Monitoring/Object/Host.php
Expand Up @@ -164,6 +164,7 @@ public function fetchServices()
*/
public static function getStateText($state, $translate = false)
{
$translate = (bool) $translate;
switch ((int) $state) {
case self::STATE_UP:
$text = $translate ? mt('monitoring', 'up') : 'up';
Expand All @@ -179,7 +180,6 @@ public static function getStateText($state, $translate = false)
break;
default:
throw new InvalidArgumentException('Invalid host state \'%s\'', $state);
break;
}
return $text;
}
Expand Down

0 comments on commit eb9fe09

Please sign in to comment.