Skip to content

Commit 7fe43c4

Browse files
committed
- skip code coverage for macOS (platform dependent check; tests run on Linux)
1 parent 316b65f commit 7fe43c4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

UUID.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,14 @@ public static function v1(string|int $address = null): string
186186
if ($node = `hostname -i 2> /dev/null`) {
187187
return $node = vsprintf('%02x%02x%02x%02x', explode('.', $node));
188188
}
189+
// @codeCoverageIgnoreStart
189190
if ($node = `hostname 2> /dev/null`) {
191+
// macOS
190192
$node = gethostbyname(trim($node));
191193
return $node = vsprintf('%02x%02x%02x%02x', explode('.', $node));
192194
}
195+
// @codeCoverageIgnoreEnd
196+
193197
// Cannot identify IP or host, fallback as described in
194198
// http://tools.ietf.org/html/rfc4122#section-4.5
195199
// https://en.wikipedia.org/wiki/MAC_address#Unicast_vs._multicast_(I/G_bit)

0 commit comments

Comments
 (0)