Skip to content

Commit 7013b1b

Browse files
authored
Merge pull request #46 from shulard/chore/fix-ci-builds
Add missing configuration file for GitHub action builds.
2 parents 16e7abd + 1189d92 commit 7013b1b

8 files changed

+29
-23
lines changed

Diff for: .php_cs

-13
This file was deleted.

Diff for: .php_cs.dist

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
<?php
3+
4+
$finder = PhpCsFixer\Finder::create()
5+
->exclude('vendor')
6+
->in(__DIR__)
7+
;
8+
9+
return PhpCsFixer\Config::create()
10+
->setRules([
11+
'@Symfony' => true,
12+
'array_syntax' => ['syntax' => 'short'],
13+
])
14+
->setFinder($finder);

Diff for: phpstan.neon.dist

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
parameters:
2+
level: max
3+
paths:
4+
- src

Diff for: src/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Http\Adapter\React;
44

5-
use Http\Client\HttpClient;
65
use Http\Client\HttpAsyncClient;
6+
use Http\Client\HttpClient;
77
use Psr\Http\Message\RequestInterface;
88
use Psr\Http\Message\ResponseInterface;
99
use React\EventLoop\LoopInterface;

Diff for: src/Promise.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ final class Promise implements HttpPromise
3030
/**
3131
* PSR7 received response.
3232
*
33-
* @var ResponseInterface
33+
* @var ResponseInterface|null
3434
*/
3535
private $response;
3636

3737
/**
3838
* Execution error.
3939
*
40-
* @var Exception
40+
* @var HttplugException
4141
*/
4242
private $exception;
4343

@@ -69,7 +69,7 @@ public function __construct(PromiseInterface $promise, LoopInterface $loop, Requ
6969
$this->request = $request;
7070
$this->loop = $loop;
7171
$this->promise = $promise->then(
72-
function (?ResponseInterface $response): ResponseInterface {
72+
function (?ResponseInterface $response): ?ResponseInterface {
7373
$this->response = $response;
7474
$this->state = self::FULFILLED;
7575

@@ -92,7 +92,8 @@ function ($reason): void {
9292
}
9393

9494
throw $this->exception;
95-
});
95+
}
96+
);
9697
}
9798

9899
public function then(?callable $onFulfilled = null, ?callable $onRejected = null)

Diff for: src/ReactFactory.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Http\Adapter\React;
44

5-
use React\EventLoop\LoopInterface;
65
use React\EventLoop\Factory as EventLoopFactory;
6+
use React\EventLoop\LoopInterface;
77
use React\Http\Browser;
88
use React\Socket\ConnectorInterface;
99

@@ -25,8 +25,8 @@ public static function buildEventLoop(): LoopInterface
2525
/**
2626
* Build a React Http Client.
2727
*
28-
* @param ConnectorInterface|null $connector Only pass this argument if you need to customize DNS
29-
* behaviour.
28+
* @param ConnectorInterface|null $connector only pass this argument if you need to customize DNS
29+
* behaviour
3030
*/
3131
public static function buildHttpClient(
3232
LoopInterface $loop,

Diff for: tests/AsyncClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace Http\Adapter\React\Tests;
44

5-
use Http\Client\Tests\HttpAsyncClientTest;
65
use Http\Adapter\React\Client;
76
use Http\Client\HttpAsyncClient;
7+
use Http\Client\Tests\HttpAsyncClientTest;
88

99
/**
1010
* @author Stéphane Hulard <[email protected]>

Diff for: tests/ClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Http\Adapter\React\Tests;
44

5-
use Http\Client\Tests\HttpClientTest;
65
use Http\Adapter\React\Client;
6+
use Http\Client\Tests\HttpClientTest;
77
use Psr\Http\Client\ClientInterface;
88

99
/**

0 commit comments

Comments
 (0)