From 1605264f60a7856a684ec6702e05e16f9cf08e11 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 4 Jan 2024 19:45:52 +0100 Subject: [PATCH] cleanup promise phpdoc --- .github/workflows/static.yml | 3 +++ composer.json | 2 +- src/Exception/RequestAwareTrait.php | 3 --- src/Promise/HttpFulfilledPromise.php | 9 --------- src/Promise/HttpRejectedPromise.php | 9 --------- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 98c17c1..143e55e 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -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: docker://oskarstark/phpstan-ga with: diff --git a/composer.json b/composer.json index 7391770..c8d1d00 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ ], "require": { "php": "^7.1 || ^8.0", - "php-http/promise": "^1.1", + "php-http/promise": "dev-phpdoc-revert as 1.3.0", "psr/http-client": "^1.0", "psr/http-message": "^1.0 || ^2.0" }, diff --git a/src/Exception/RequestAwareTrait.php b/src/Exception/RequestAwareTrait.php index 71b4bb8..f507982 100644 --- a/src/Exception/RequestAwareTrait.php +++ b/src/Exception/RequestAwareTrait.php @@ -16,9 +16,6 @@ private function setRequest(RequestInterface $request) $this->request = $request; } - /** - * {@inheritdoc} - */ public function getRequest(): RequestInterface { return $this->request; diff --git a/src/Promise/HttpFulfilledPromise.php b/src/Promise/HttpFulfilledPromise.php index 1ad32cd..20ec1d3 100644 --- a/src/Promise/HttpFulfilledPromise.php +++ b/src/Promise/HttpFulfilledPromise.php @@ -18,9 +18,6 @@ public function __construct(ResponseInterface $response) $this->response = $response; } - /** - * {@inheritdoc} - */ public function then(callable $onFulfilled = null, callable $onRejected = null) { if (null === $onFulfilled) { @@ -34,17 +31,11 @@ public function then(callable $onFulfilled = null, callable $onRejected = null) } } - /** - * {@inheritdoc} - */ public function getState() { return Promise::FULFILLED; } - /** - * {@inheritdoc} - */ public function wait($unwrap = true) { if ($unwrap) { diff --git a/src/Promise/HttpRejectedPromise.php b/src/Promise/HttpRejectedPromise.php index 624cc8a..d147259 100644 --- a/src/Promise/HttpRejectedPromise.php +++ b/src/Promise/HttpRejectedPromise.php @@ -17,9 +17,6 @@ public function __construct(Exception $exception) $this->exception = $exception; } - /** - * {@inheritdoc} - */ public function then(callable $onFulfilled = null, callable $onRejected = null) { if (null === $onRejected) { @@ -38,17 +35,11 @@ public function then(callable $onFulfilled = null, callable $onRejected = null) } } - /** - * {@inheritdoc} - */ public function getState() { return Promise::REJECTED; } - /** - * {@inheritdoc} - */ public function wait($unwrap = true) { if ($unwrap) {