Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jul 22, 2023
1 parent ea98f73 commit eb240da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static function chromeVersionCommands(string $operatingSystem): array
{
$commands = static::$platforms[$operatingSystem]['commands'] ?? null;

if (is_null($commands)) {
if (\is_null($commands)) {
throw new InvalidArgumentException("Unable to find commands for Operating System [{$operatingSystem}]");
}

Expand All @@ -73,7 +73,7 @@ public static function chromeDriverBinary(string $operatingSystem): string
{
$binary = static::$platforms[$operatingSystem]['binary'] ?? null;

if (is_null($binary)) {
if (\is_null($binary)) {
throw new InvalidArgumentException("Unable to find ChromeDriver binary for Operating System [{$operatingSystem}]");
}

Expand All @@ -89,11 +89,11 @@ public static function chromeDriverSlug(string $operatingSystem, $version = null
{
$slug = static::$platforms[$operatingSystem]['slug'] ?? null;

if (is_null($slug)) {
if (\is_null($slug)) {
throw new InvalidArgumentException("Unable to find ChromeDriver slug for Operating System [{$operatingSystem}]");
}

if (! is_null($version) && version_compare($version, '115.0', '<')) {
if (! \is_null($version) && version_compare($version, '115.0', '<')) {
if ($slug === 'mac-arm64') {
return version_compare($version, '106.0.5249', '<') ? 'mac64_m1' : 'mac_arm64';
} elseif ($slug === 'mac-x64') {
Expand Down
2 changes: 1 addition & 1 deletion tests/OperatingSystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class OperatingSystemTest extends TestCase
{
public function test_it_matches_possible_os()
{
$this->assertTrue(in_array(OperatingSystem::id(), OperatingSystem::all()));
$this->assertTrue(\in_array(OperatingSystem::id(), OperatingSystem::all()));
}

public function test_it_has_correct_os()
Expand Down

0 comments on commit eb240da

Please sign in to comment.