diff --git a/src/Client.php b/src/Client.php index 6b25cef6..fe525955 100644 --- a/src/Client.php +++ b/src/Client.php @@ -264,10 +264,8 @@ public function request(string $method, string $uri, array $parameters = [], arr throw new \InvalidArgumentException('The history always change when using WebDriver.'); } - foreach (['parameters', 'files', 'server'] as $arg) { - if ([] !== $$arg) { - throw new \InvalidArgumentException(sprintf('The parameter "$%s" is not supported when using WebDriver.', $arg)); - } + if ([] !== $parameters || [] !== $files || [] !== $server) { + throw new \InvalidArgumentException('The arguments $parameters, $files, and $server are not supported when using WebDriver.'); } $this->get($uri);