]> git.mxchange.org Git - friendica.git/commitdiff
Update src/Core/Worker/Factory/Process.php
authorPhilipp <admin+Github@philipp.info>
Sun, 7 Nov 2021 12:29:33 +0000 (13:29 +0100)
committerGitHub <noreply@github.com>
Sun, 7 Nov 2021 12:29:33 +0000 (13:29 +0100)
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
src/Core/Worker/Factory/Process.php

index 7e9c2606fb94e145e6c51cd58814a4a273074448..9a45eebc41f420249af83a175e4a7c2bb4d27cf5 100644 (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