Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static ci #233

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Remove phpspec
run: composer remove --dev friends-of-phpspec/phpspec-code-coverage phpspec/phpspec

- name: PHPStan
uses: OskarStark/phpstan-ga@0.12.32
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## unreleased

- Cleaned up phpdoc.

## 2.7.1 - 2023-11-30

- Allow installation with Symfony 7.
Expand Down
9 changes: 0 additions & 9 deletions src/Deferred.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public function __construct(callable $waitCallback)
$this->onRejectedCallbacks = [];
}

/**
* {@inheritdoc}
*/
public function then(callable $onFulfilled = null, callable $onRejected = null): Promise
{
$deferred = new self($this->waitCallback);
Expand Down Expand Up @@ -86,9 +83,6 @@ public function then(callable $onFulfilled = null, callable $onRejected = null):
return $deferred;
}

/**
* {@inheritdoc}
*/
public function getState(): string
{
return $this->state;
Expand Down Expand Up @@ -128,9 +122,6 @@ public function reject(ClientExceptionInterface $exception): void
}
}

/**
* {@inheritdoc}
*/
public function wait($unwrap = true)
{
if (Promise::PENDING === $this->state) {
Expand Down
2 changes: 0 additions & 2 deletions src/HttpAsyncClientDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ trait HttpAsyncClientDecorator
protected $httpAsyncClient;

/**
* {@inheritdoc}
*
* @see HttpAsyncClient::sendAsyncRequest
*/
public function sendAsyncRequest(RequestInterface $request)
Expand Down
4 changes: 0 additions & 4 deletions src/HttpAsyncClientEmulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@
trait HttpAsyncClientEmulator
{
/**
* {@inheritdoc}
*
* @see HttpClient::sendRequest
*/
abstract public function sendRequest(RequestInterface $request): ResponseInterface;

/**
* {@inheritdoc}
*
* @see HttpAsyncClient::sendAsyncRequest
*/
public function sendAsyncRequest(RequestInterface $request)
Expand Down
2 changes: 0 additions & 2 deletions src/HttpClientDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ trait HttpClientDecorator
protected $httpClient;

/**
* {@inheritdoc}
*
* @see ClientInterface::sendRequest
*/
public function sendRequest(RequestInterface $request): ResponseInterface
Expand Down
4 changes: 0 additions & 4 deletions src/HttpClientEmulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
trait HttpClientEmulator
{
/**
* {@inheritdoc}
*
* @see HttpClient::sendRequest
*/
public function sendRequest(RequestInterface $request): ResponseInterface
Expand All @@ -27,8 +25,6 @@ public function sendRequest(RequestInterface $request): ResponseInterface
}

/**
* {@inheritdoc}
*
* @see HttpAsyncClient::sendAsyncRequest
*/
abstract public function sendAsyncRequest(RequestInterface $request);
Expand Down
6 changes: 0 additions & 6 deletions src/HttpClientPool/HttpClientPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,11 @@ public function addHttpClient($client): void
*/
abstract protected function chooseHttpClient(): HttpClientPoolItem;

/**
* {@inheritdoc}
*/
public function sendAsyncRequest(RequestInterface $request)
{
return $this->chooseHttpClient()->sendAsyncRequest($request);
}

/**
* {@inheritdoc}
*/
public function sendRequest(RequestInterface $request): ResponseInterface
{
return $this->chooseHttpClient()->sendRequest($request);
Expand Down
6 changes: 0 additions & 6 deletions src/HttpClientPool/HttpClientPoolItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ public function __construct($client, int $reenableAfter = null)
$this->reenableAfter = $reenableAfter;
}

/**
* {@inheritdoc}
*/
public function sendRequest(RequestInterface $request): ResponseInterface
{
if ($this->isDisabled()) {
Expand All @@ -92,9 +89,6 @@ public function sendRequest(RequestInterface $request): ResponseInterface
return $response;
}

/**
* {@inheritdoc}
*/
public function sendAsyncRequest(RequestInterface $request)
{
if ($this->isDisabled()) {
Expand Down
3 changes: 0 additions & 3 deletions src/HttpClientPool/LeastUsedClientPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
final class LeastUsedClientPool extends HttpClientPool
{
/**
* {@inheritdoc}
*/
protected function chooseHttpClient(): HttpClientPoolItem
{
$clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) {
Expand Down
3 changes: 0 additions & 3 deletions src/HttpClientPool/RandomClientPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*/
final class RandomClientPool extends HttpClientPool
{
/**
* {@inheritdoc}
*/
protected function chooseHttpClient(): HttpClientPoolItem
{
$clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) {
Expand Down
3 changes: 0 additions & 3 deletions src/HttpClientPool/RoundRobinClientPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*/
final class RoundRobinClientPool extends HttpClientPool
{
/**
* {@inheritdoc}
*/
protected function chooseHttpClient(): HttpClientPoolItem
{
$last = current($this->clientPool);
Expand Down
8 changes: 0 additions & 8 deletions src/HttpClientRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use Psr\Http\Message\ResponseInterface;

/**
* {@inheritdoc}
*
* @author Joel Wurtz <joel.wurtz@gmail.com>
*/
final class HttpClientRouter implements HttpClientRouterInterface
Expand All @@ -23,17 +21,11 @@ final class HttpClientRouter implements HttpClientRouterInterface
*/
private $clients = [];

/**
* {@inheritdoc}
*/
public function sendRequest(RequestInterface $request): ResponseInterface
{
return $this->chooseHttpClient($request)->sendRequest($request);
}

/**
* {@inheritdoc}
*/
public function sendAsyncRequest(RequestInterface $request)
{
return $this->chooseHttpClient($request)->sendAsyncRequest($request);
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/AddHostPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public function __construct(UriInterface $host, array $config = [])
$this->replace = $options['replace'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
if ($this->replace || '' === $request->getUri()->getHost()) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/AuthenticationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ public function __construct(Authentication $authentication)
$this->authentication = $authentication;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$request = $this->authentication->authenticate($request);
Expand Down
5 changes: 1 addition & 4 deletions src/Plugin/BaseUriPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class BaseUriPlugin implements Plugin
/**
* @var AddPathPlugin|null
*/
private $addPathPlugin = null;
private $addPathPlugin;

/**
* @param UriInterface $uri Has to contain a host name and can have a path
Expand All @@ -39,9 +39,6 @@ public function __construct(UriInterface $uri, array $hostConfig = [])
}
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$addHostNext = function (RequestInterface $request) use ($next, $first) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/ContentLengthPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
final class ContentLengthPlugin implements Plugin
{
/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
if (!$request->hasHeader('Content-Length')) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/ContentTypePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ public function __construct(array $config = [])
$this->sizeLimit = $options['size_limit'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
if (!$request->hasHeader('Content-Type')) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/CookiePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public function __construct(CookieJar $cookieJar)
$this->cookieJar = $cookieJar;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$cookies = [];
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/DecoderPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public function __construct(array $config = [])
$this->useContentEncoding = $options['use_content_encoding'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$encodings = extension_loaded('zlib') ? ['gzip', 'deflate'] : ['identity'];
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/ErrorPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ public function __construct(array $config = [])
$this->onlyServerException = $options['only_server_exception'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$promise = $next($request);
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/HeaderAppendPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public function __construct(array $headers)
$this->headers = $headers;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
foreach ($this->headers as $header => $headerValue) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/HeaderDefaultsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ public function __construct(array $headers)
$this->headers = $headers;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
foreach ($this->headers as $header => $headerValue) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/HeaderRemovePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ public function __construct(array $headers)
$this->headers = $headers;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
foreach ($this->headers as $header) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/HeaderSetPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ public function __construct(array $headers)
$this->headers = $headers;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
foreach ($this->headers as $header => $headerValue) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/HistoryPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public function __construct(Journal $journal)
$this->journal = $journal;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$journal = $this->journal;
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/QueryDefaultsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ public function __construct(array $queryParams)
$this->queryParams = $queryParams;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$uri = $request->getUri();
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/RedirectPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ public function __construct(array $config = [])
$this->streamFactory = $options['stream_factory'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
// Check in storage
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/RequestMatcherPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ public function __construct(RequestMatcher $requestMatcher, ?Plugin $delegateOnM
$this->failurePlugin = $delegateOnNoMatch;
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
if ($this->requestMatcher->matches($request)) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/RequestSeekableBodyPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
final class RequestSeekableBodyPlugin extends SeekableBodyPlugin
{
/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
if (!$request->getBody()->isSeekable()) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/ResponseSeekableBodyPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
final class ResponseSeekableBodyPlugin extends SeekableBodyPlugin
{
/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
return $next($request)->then(function (ResponseInterface $response) {
Expand Down
3 changes: 0 additions & 3 deletions src/Plugin/RetryPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ public function __construct(array $config = [])
$this->exceptionDelay = $options['exception_delay'];
}

/**
* {@inheritdoc}
*/
public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$chainIdentifier = spl_object_hash((object) $first);
Expand Down
Loading