Skip to content

Commit 1bf00d3

Browse files
committed
refactor(Unittest): simplifiy boolean assignment in Helpers::has_internet method
1 parent fb79f39 commit 1bf00d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/unittest/classes/Kohana/Unittest/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static function has_internet()
2424
// The @ operator is used here to avoid DNS errors when there is no connection.
2525
$sock = @fsockopen("www.google.com", 80, $errno, $errstr, 1);
2626

27-
self::$_has_internet = (bool) $sock ? true : false;
27+
self::$_has_internet = (bool) $sock;
2828
}
2929

3030
return self::$_has_internet;

0 commit comments

Comments
 (0)