Skip to content

Commit

Permalink
latest cs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dbu committed Mar 16, 2024
1 parent 427e734 commit c6975e5
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 44 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: Tests
on: [push, pull_request]
on:
push:
branches:
- '[0-9]+.x'
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.x'
pull_request:

jobs:
build:
Expand Down
6 changes: 0 additions & 6 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,11 @@ public static function createWithConfig(array $config): Client
return new self(self::buildClient($config));
}

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

/**
* {@inheritdoc}
*/
public function sendAsyncRequest(RequestInterface $request)
{
$promise = $this->guzzle->sendAsync($request);
Expand Down
11 changes: 1 addition & 10 deletions src/Promise.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,16 @@ public function __construct(PromiseInterface $promise, RequestInterface $request
});
}

/**
* {@inheritdoc}
*/
public function then(callable $onFulfilled = null, callable $onRejected = null)
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)
{
return new static($this->promise->then($onFulfilled, $onRejected), $this->request);
}

/**
* {@inheritdoc}
*/
public function getState()
{
return $this->state;
}

/**
* {@inheritdoc}
*/
public function wait($unwrap = true)
{
$this->promise->wait(false);
Expand Down
3 changes: 0 additions & 3 deletions tests/CurlHttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class CurlHttpAdapterTest extends HttpAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new CurlHandler();
Expand Down
3 changes: 0 additions & 3 deletions tests/CurlHttpAsyncAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class CurlHttpAsyncAdapterTest extends HttpAsyncAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new CurlHandler();
Expand Down
3 changes: 0 additions & 3 deletions tests/DefaultHttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
*/
class DefaultHttpAdapterTest extends HttpClientTest
{
/**
* {@inheritdoc}
*/
protected function createHttpAdapter(): ClientInterface
{
return new Client();
Expand Down
3 changes: 0 additions & 3 deletions tests/HttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
*/
abstract class HttpAdapterTest extends HttpClientTest
{
/**
* {@inheritdoc}
*/
protected function createHttpAdapter(): ClientInterface
{
return new Client(new GuzzleClient(['handler' => $this->createHandler()]));
Expand Down
3 changes: 0 additions & 3 deletions tests/HttpAsyncAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
*/
abstract class HttpAsyncAdapterTest extends HttpAsyncClientTest
{
/**
* {@inheritdoc}
*/
protected function createHttpAsyncClient(): HttpAsyncClient
{
return new Client(new GuzzleClient(['handler' => $this->createHandler()]));
Expand Down
3 changes: 0 additions & 3 deletions tests/MultiCurlHttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class MultiCurlHttpAdapterTest extends HttpAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new CurlMultiHandler();
Expand Down
3 changes: 0 additions & 3 deletions tests/MultiCurlHttpAsyncAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class MultiCurlHttpAsyncAdapterTest extends HttpAsyncAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new CurlMultiHandler();
Expand Down
3 changes: 0 additions & 3 deletions tests/StreamHttpAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class StreamHttpAdapterTest extends HttpAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new StreamHandler();
Expand Down
3 changes: 0 additions & 3 deletions tests/StreamHttpAsyncAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
*/
class StreamHttpAsyncAdapterTest extends HttpAsyncAdapterTest
{
/**
* {@inheritdoc}
*/
protected function createHandler()
{
return new StreamHandler();
Expand Down

0 comments on commit c6975e5

Please sign in to comment.