Skip to content

Commit

Permalink
🚿
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Jan 23, 2018
1 parent bad085e commit 6b29e3d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
10 changes: 6 additions & 4 deletions src/GuzzleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ class GuzzleClient extends HTTPClientAbstract{
/**
* GuzzleClient constructor.
*
* @param \chillerlan\Traits\ContainerInterface|null $options
* @param \GuzzleHttp\Client|null $http
* @param \chillerlan\Traits\ContainerInterface $options
* @param \GuzzleHttp\Client|null $http
*/
public function __construct(ContainerInterface $options = null, Client $http = null){
public function __construct(ContainerInterface $options, Client $http = null){
parent::__construct($options);

$this->setClient($http);
if($http instanceof Client){
$this->setClient($http);
}
}

/** @inheritdoc */
Expand Down
10 changes: 5 additions & 5 deletions src/HTTPClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ interface HTTPClientInterface{
public function __construct(ContainerInterface $options);

/**
* @param string $url
* @param array $params
* @param string $method
* @param mixed $body
* @param array $headers
* @param string $url
* @param array|null $params
* @param string|null $method
* @param mixed|null $body
* @param array|null $headers
*
* @return \chillerlan\HTTP\HTTPResponseInterface
* @throws \chillerlan\HTTP\HTTPClientException
Expand Down
6 changes: 4 additions & 2 deletions src/TinyCurlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ class TinyCurlClient extends HTTPClientAbstract{
* TinyCurlClient constructor.
*
* @param \chillerlan\Traits\ContainerInterface $options
* @param \chillerlan\TinyCurl\Request $http
* @param \chillerlan\TinyCurl\Request|null $http
*/
public function __construct(ContainerInterface $options, Request $http = null){
parent::__construct($options);

$this->setClient($http);
if($http instanceof Request){
$this->setClient($http);
}
}

/** @inheritdoc */
Expand Down

0 comments on commit 6b29e3d

Please # to comment.