Don't access soft_state property directly

This commit is contained in:
Yonas Habteab 2021-09-23 17:24:59 +02:00 committed by Johannes Meyer
parent a0499f2cfa
commit 6cea734a59
2 changed files with 4 additions and 4 deletions

View file

@ -73,7 +73,7 @@ class HostState extends State
*/
public function getStateText()
{
return HostStates::text($this->properties['soft_state']);
return HostStates::text($this->soft_state);
}
/**
@ -83,6 +83,6 @@ class HostState extends State
*/
public function getStateTextTranslated()
{
return HostStates::text($this->properties['soft_state']);
return HostStates::text($this->soft_state);
}
}

View file

@ -70,7 +70,7 @@ class ServiceState extends State
*/
public function getStateText()
{
return ServiceStates::text($this->properties['soft_state']);
return ServiceStates::text($this->soft_state);
}
/**
@ -80,6 +80,6 @@ class ServiceState extends State
*/
public function getStateTextTranslated()
{
return ServiceStates::text($this->properties['soft_state']);
return ServiceStates::text($this->soft_state);
}
}