Skip to content

Commit 1b14f0e

Browse files
committed
PSR: depend on psr client and not http client
1 parent f970e8f commit 1b14f0e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.php-cs-fixer.php

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
->setRiskyAllowed(true)
1313
->setRules(array(
1414
'@PSR2' => true,
15+
'no_unused_imports' => true,
1516
))
1617
->setFinder($finder)
1718
;

src/Api/Projects.php

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace PrivatePackagist\ApiClient\Api;
1111

12-
use PrivatePackagist\ApiClient\Exception\InvalidArgumentException;
13-
1412
/**
1513
* @deprecated Use the Subrepositories API instead
1614
*/

src/HttpClient/HttpPluginClientBuilder.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
use Http\Client\Common\HttpMethodsClient;
1313
use Http\Client\Common\Plugin;
1414
use Http\Client\Common\PluginClient;
15-
use Http\Client\HttpClient;
1615
use Http\Discovery\HttpClientDiscovery;
1716
use Http\Discovery\MessageFactoryDiscovery;
1817
use Http\Message\RequestFactory;
18+
use Psr\Http\Client\ClientInterface;
1919

2020
class HttpPluginClientBuilder
2121
{
22-
/** @var HttpClient */
22+
/** @var ClientInterface */
2323
private $httpClient;
2424
/** @var HttpMethodsClient|null */
2525
private $pluginClient;
@@ -28,7 +28,7 @@ class HttpPluginClientBuilder
2828
/** @var Plugin[] */
2929
private $plugins = [];
3030

31-
public function __construct(HttpClient $httpClient = null, RequestFactory $requestFactory = null)
31+
public function __construct(ClientInterface $httpClient = null, RequestFactory $requestFactory = null)
3232
{
3333
$this->httpClient = $httpClient ?: HttpClientDiscovery::find();
3434
$this->requestFactory = $requestFactory ?: MessageFactoryDiscovery::find();

0 commit comments

Comments
 (0)