diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b505ec..1eaabbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,14 @@ jobs: matrix: php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] coverage: ['xdebug'] + code-style: ['no'] code-analysis: ['no'] include: - php-versions: '7.1' + code-style: 'yes' + code-analysis: 'yes' + - php-versions: '8.4' + code-style: 'no' code-analysis: 'yes' steps: - name: Checkout @@ -45,7 +50,7 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Code Analysis (PHP CS-Fixer) - if: matrix.code-analysis == 'yes' + if: matrix.code-style == 'yes' run: php vendor/bin/php-cs-fixer fix --dry-run --diff - name: Code Analysis (PHPStan) diff --git a/lib/Client.php b/lib/Client.php index 0837e8d..ed07045 100644 --- a/lib/Client.php +++ b/lib/Client.php @@ -175,7 +175,7 @@ public function send(RequestInterface $request): ResponseInterface * After calling sendAsync, you must therefore occasionally call the poll() * method, or wait(). */ - public function sendAsync(RequestInterface $request, callable $success = null, callable $error = null) + public function sendAsync(RequestInterface $request, ?callable $success = null, ?callable $error = null) { $this->emit('beforeRequest', [$request]); $this->sendAsyncInternal($request, $success, $error); diff --git a/lib/Response.php b/lib/Response.php index c06c963..7b622fe 100644 --- a/lib/Response.php +++ b/lib/Response.php @@ -103,7 +103,7 @@ class Response extends Message implements ResponseInterface * @param array $headers * @param resource $body */ - public function __construct($status = 500, array $headers = null, $body = null) + public function __construct($status = 500, ?array $headers = null, $body = null) { if (null !== $status) { $this->setStatus($status);