We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb75c6c commit 86deb4eCopy full SHA for 86deb4e
src/SDK/Resource/Detectors/Host.php
@@ -55,17 +55,12 @@ private function readFile(string $file): string|false
55
set_error_handler(static fn () => true);
56
57
try {
58
- if (is_file($file) && is_readable($file)) {
59
- $contents = file_get_contents($file);
60
- if ($contents !== false) {
61
- return $contents;
62
- }
63
+ $contents = file_get_contents($file);
+
+ return $contents !== false ? trim($contents) : false;
64
} finally {
65
restore_error_handler();
66
}
67
-
68
- return false;
69
70
71
private function getLinuxId(): ?string
0 commit comments