Skip to content

Commit 34b0e05

Browse files
committed
fix static analysis
1 parent 4dd732b commit 34b0e05

File tree

7 files changed

+31
-32
lines changed

7 files changed

+31
-32
lines changed

.gitattributes

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
.editorconfig export-ignore
2-
.gitattributes export-ignore
3-
/.github/ export-ignore
4-
.gitignore export-ignore
5-
/.php_cs export-ignore
6-
/.scrutinizer.yml export-ignore
7-
/.styleci.yml export-ignore
8-
/.travis.yml export-ignore
9-
/behat.yml.dist export-ignore
10-
/features/ export-ignore
11-
/phpspec.ci.yml export-ignore
12-
/phpspec.yml.dist export-ignore
13-
/phpunit.xml.dist export-ignore
14-
/spec/ export-ignore
15-
/tests/ export-ignore
1+
.editorconfig export-ignore
2+
.gitattributes export-ignore
3+
/.github/ export-ignore
4+
.gitignore export-ignore
5+
/.php-cs-fixer.dist.php export-ignore
6+
/phpstan.neon.dist export-ignore
7+
/phpunit.xml.dist export-ignore
8+
/tests/ export-ignore

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: PHP-CS-Fixer
3434
uses: docker://oskarstark/php-cs-fixer-ga
3535
with:
36-
args: --dry-run --diff-format udiff
36+
args: --dry-run --diff

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
/behat.yml
21
/build/
32
/composer.lock
4-
/phpspec.yml
53
/phpunit.xml
64
/vendor/
5+
.php-cs-fixer.php
76
.phpunit.result.cache

.php-cs-fixer.dist.php

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

.php_cs.dist

Lines changed: 0 additions & 14 deletions
This file was deleted.

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ parameters:
22
level: max
33
paths:
44
- src
5+
ignoreErrors:
6+
- message: '#^Method Http\\Adapter\\React\\Client::sendRequest\(\) should return Psr\\Http\\Message\\ResponseInterface but returns mixed.$#'
7+
path: src/Client.php

src/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function sendRequest(RequestInterface $request): ResponseInterface
5252
{
5353
$promise = $this->sendAsyncRequest($request);
5454

55+
// The promise is declared to return mixed, but the react client promise returns a response.
56+
// We unwrap the exception if there is any, otherwise the promise would return null on error.
5557
return $promise->wait();
5658
}
5759

0 commit comments

Comments
 (0)