From a300429b41b953517865a74e061ede02090de169 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Thu, 24 Mar 2022 09:35:40 +0100 Subject: [PATCH] Require phpstan v1 (#20) --- composer.json | 6 +++--- src/Extractor/Extractor.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index acbfaad..8c068b2 100644 --- a/composer.json +++ b/composer.json @@ -29,9 +29,9 @@ "hectorj/safe-php-psalm-plugin": "dev-master#b60ed45a06d5246e2efd193ce9c8940b244d5c7d", "jakub-onderka/php-parallel-lint": "^1.0", "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "0.12.99", - "phpstan/phpstan-phpunit": "0.12.22", - "phpstan/phpstan-strict-rules": "^0.12.7", + "phpstan/phpstan": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.0.0", "phpunit/phpunit": "^9.5", "psalm/plugin-phpunit": "0.16.1", "thecodingmachine/phpstan-safe-rule": "^1.0", diff --git a/src/Extractor/Extractor.php b/src/Extractor/Extractor.php index 846ccc9..1530f71 100644 --- a/src/Extractor/Extractor.php +++ b/src/Extractor/Extractor.php @@ -10,12 +10,12 @@ abstract class Extractor { - /** @var array{id: string, jsonrpc: string, error?: array{code: int, message: string, data?: mixed}, method: string, params?: array} */ + /** @var array{id: string, jsonrpc: string, error?: array{code: int, message: string, data?: mixed}, method: string, params?: array, result?: mixed} */ protected array $messageContents; public function __construct(MessageInterface $message) { - /** @var array{id: string, jsonrpc: string, error?: array{code: int, message: string, data?: mixed}, method: string, params?: array} $contents */ + /** @var array{id: string, jsonrpc: string, error?: array{code: int, message: string, data?: mixed}, method: string, params?: array, result?: mixed} $contents */ $contents = json_decode((string) $message->getBody(), true); $this->messageContents = $contents; }