Add Stringable interface to validateOS method

This commit is contained in:
Andras Bacsai 2023-11-28 13:21:32 +01:00
parent b26e23e7c3
commit e35b8a0f96

View File

@ -18,6 +18,7 @@
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
use Spatie\SchemalessAttributes\SchemalessAttributesTrait;
use Illuminate\Support\Str;
use Stringable;
class Server extends BaseModel
{
@ -333,7 +334,7 @@ public function isLogDrainEnabled()
{
return $this->settings->is_logdrain_newrelic_enabled || $this->settings->is_logdrain_highlight_enabled || $this->settings->is_logdrain_axiom_enabled;
}
public function validateOS(): bool | Str
public function validateOS(): bool | Stringable
{
$os_release = instant_remote_process(['cat /etc/os-release'], $this);
$datas = collect(explode("\n", $os_release));