diff --git a/composer.json b/composer.json index e1b940c..e7ce344 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "thecodingmachine/safe": "^1.0" }, "require-dev": { - "cdn77/coding-standard": "^4.0", + "cdn77/coding-standard": "^5.0", "infection/infection": "^0.20.1", "nyholm/psr7": "^1.2", "php-http/curl-client": "^2.1", diff --git a/src/Client/ClickHouseAsyncClient.php b/src/Client/ClickHouseAsyncClient.php index bbe5732..3dafef9 100644 --- a/src/Client/ClickHouseAsyncClient.php +++ b/src/Client/ClickHouseAsyncClient.php @@ -14,18 +14,18 @@ interface ClickHouseAsyncClient * @see Output hack for IDE to preserve `use` * * @param array $requestParameters - * - * @psalm-template O of Output * @psalm-param Format $outputFormat + * + * @template O of Output */ public function select(string $sql, Format $outputFormat, array $requestParameters = []) : PromiseInterface; /** * @param array $requestParameters * @param array $queryParameters - * - * @psalm-template O of Output * @psalm-param Format $outputFormat + * + * @template O of Output */ public function selectWithParameters( string $query, diff --git a/src/Client/ClickHouseClient.php b/src/Client/ClickHouseClient.php index 02eaeec..cbc41f6 100644 --- a/src/Client/ClickHouseClient.php +++ b/src/Client/ClickHouseClient.php @@ -16,20 +16,22 @@ public function executeQueryWithParameters(string $query, array $queryParameters /** * @param array $requestParameters + * @psalm-param Format $outputFormat * - * @psalm-template O of Output - * @psalm-param Format $outputFormat - * @psalm-return O + * @psalm-return O + * + * @template O of Output */ public function select(string $query, Format $outputFormat, array $requestParameters = []) : Output; /** * @param array $requestParameters - * @param array $queryParameters + * @param array $queryParameters + * @psalm-param Format $outputFormat + * + * @psalm-return O * - * @psalm-template O of Output - * @psalm-param Format $outputFormat - * @psalm-return O + * @template O of Output */ public function selectWithParameters( string $query, @@ -40,13 +42,14 @@ public function selectWithParameters( /** * @param array> $values - * @param array|null $columns + * @param array|null $columns */ public function insert(string $table, array $values, ?array $columns = null) : void; /** - * @psalm-template O of Output - * @psalm-param Format $inputFormat + * @psalm-param Format $inputFormat + * + * @template O of Output */ public function insertWithFormat(string $table, Format $inputFormat, string $data) : void; } diff --git a/src/Format/Format.php b/src/Format/Format.php index 4938e2b..101cfff 100644 --- a/src/Format/Format.php +++ b/src/Format/Format.php @@ -6,7 +6,7 @@ use SimPod\ClickHouseClient\Output\Output; -/** @psalm-template-covariant O of Output */ +/** @template-covariant O of Output */ interface Format { /** @psalm-return O */ diff --git a/src/Snippet/TableSizes.php b/src/Snippet/TableSizes.php index 13fea0a..16ea553 100644 --- a/src/Snippet/TableSizes.php +++ b/src/Snippet/TableSizes.php @@ -11,11 +11,7 @@ /** @psalm-type entry = array{name: string, database: string, size: string, min_date: string, max_date: string} */ final class TableSizes { - /** - * @return array - * - * @phpstan-return array> - */ + /** @return array> */ public static function run(ClickHouseClient $clickHouseClient, ?string $databaseName = null) : array { /**