private function getLinuxId() : ?string { $paths = [ self::PATH_ETC_MACHINEID, self::PATH_VAR_LIB_DBUS_MACHINEID, ]; foreach ($paths as $path) { $file = $this->dir . $path; if (is_file($file) && is_readable($file)) { return trim(file_get_contents($file)); } } return null; }