Skip to content

Commit

Permalink
Remove dynamic call method
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 31, 2024
1 parent 5b5a290 commit 2eeb8c1
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/Client.php
Expand Up @@ -70,28 +70,6 @@ public function __construct(array $config = [])
$this->configureDefaults($config);
}

/**
* @param string $method
* @param array $args
*
* @return PromiseInterface|ResponseInterface
*
* @deprecated Client::__call will be removed in guzzlehttp/guzzle:8.0.
*/
public function __call($method, $args)
{
if (\count($args) < 1) {
throw new InvalidArgumentException('Magic request methods require a URI and optional options array');
}

$uri = $args[0];
$opts = $args[1] ?? [];

return \substr($method, -5) === 'Async'
? $this->requestAsync(\substr($method, 0, -5), $uri, $opts)
: $this->request($method, $uri, $opts);
}

/**
* Asynchronously send an HTTP request.
*
Expand Down

0 comments on commit 2eeb8c1

Please sign in to comment.