Update src/Core/Worker/Factory/Process.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Philipp 2021-11-07 13:29:33 +01:00 committed by GitHub
parent c7be395e6a
commit fb908aca6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,11 +29,7 @@ class Process extends BaseFactory implements ICanCreateFromTableRow
{
public function determineHost(?string $hostname = null): string
{
if (empty($hostname)) {
$hostname = php_uname('n');
}
return strtolower($hostname);
return strtolower($hostname ?? php_uname('n'));
}
public function createFromTableRow(array $row): Entity\Process