Skip to content

Commit 3729e86

Browse files
committed
Fix rector styles
1 parent 5a6a493 commit 3729e86

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/Playwright/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function connectTo(string $url): void
5959

6060
// Add custom launch arguments if configured
6161
$customArgs = Playwright::getEffectiveLaunchArgs();
62-
if (! empty($customArgs)) {
62+
if ($customArgs !== []) {
6363
$launchOptions['args'] = $customArgs;
6464
}
6565

src/Playwright/Playwright.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,10 @@ public static function getEffectiveLaunchArgs(): array
253253
$args = self::$launchArgs;
254254

255255
if (self::isHeadless()) {
256-
$args = array_merge($args, self::$headlessLaunchArgs);
257-
} else {
258-
$args = array_merge($args, self::$headedLaunchArgs);
256+
return array_merge($args, self::$headlessLaunchArgs);
259257
}
260258

261-
return $args;
259+
return array_merge($args, self::$headedLaunchArgs);
262260
}
263261

264262
/**

tests/Unit/Playwright/LaunchArgsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
$reflection = new ReflectionClass(Playwright::class);
1414
$headlessProperty = $reflection->getProperty('headless');
15-
$headlessProperty->setAccessible(true);
1615
$headlessProperty->setValue(null, true);
1716
});
1817

0 commit comments

Comments
 (0)