From f160d0a2df5a4eeabc20d2e2e580ef69cae5a03f Mon Sep 17 00:00:00 2001 From: yaozm Date: Tue, 12 Mar 2024 18:18:53 +0800 Subject: [PATCH] chore(php-cs-fixer): update php-cs-fixer configuration - Added 'phpdoc_order' rule to define the order of phpdoc tags - Updated 'phpdoc_to_param_type' rule to include scalar and union types --- .php-cs-fixer.php | 13 +++++++++++++ .../Rectors/HasHttpClientDocCommentRector.php | 4 ++-- .../Rectors/HasOptionsDocCommentRector.php | 4 ++-- .../Rectors/ToInternalExceptionRector.php | 4 ++-- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index f322e76..be2fc31 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -133,6 +133,19 @@ 'type' => 'var', ], ], + 'phpdoc_order' => [ + 'order' => [ + 'deprecated', + 'internal', + 'covers', + 'uses', + 'dataProvider', + 'psalm-suppress', + 'param', + 'throws', + 'return', + ], + ], 'phpdoc_to_param_type' => [ 'scalar_types' => true, 'union_types' => true, diff --git a/src/Foundation/Rectors/HasHttpClientDocCommentRector.php b/src/Foundation/Rectors/HasHttpClientDocCommentRector.php index e8e7bd1..7a8f8dc 100644 --- a/src/Foundation/Rectors/HasHttpClientDocCommentRector.php +++ b/src/Foundation/Rectors/HasHttpClientDocCommentRector.php @@ -102,11 +102,11 @@ public function getNodeTypes(): array } /** + * @psalm-suppress MoreSpecificImplementedParamType + * * @param Trait_ $node * * @throws \ReflectionException - * - * @psalm-suppress MoreSpecificImplementedParamType */ public function refactor(Node $node) { diff --git a/src/Foundation/Rectors/HasOptionsDocCommentRector.php b/src/Foundation/Rectors/HasOptionsDocCommentRector.php index 7770252..c923459 100644 --- a/src/Foundation/Rectors/HasOptionsDocCommentRector.php +++ b/src/Foundation/Rectors/HasOptionsDocCommentRector.php @@ -112,11 +112,11 @@ public function getNodeTypes(): array } /** + * @psalm-suppress MoreSpecificImplementedParamType + * * @param Class_ $node * * @throws \ReflectionException - * - * @psalm-suppress MoreSpecificImplementedParamType */ public function refactor(Node $node) { diff --git a/src/Foundation/Rectors/ToInternalExceptionRector.php b/src/Foundation/Rectors/ToInternalExceptionRector.php index e9f35f4..4bba884 100644 --- a/src/Foundation/Rectors/ToInternalExceptionRector.php +++ b/src/Foundation/Rectors/ToInternalExceptionRector.php @@ -67,11 +67,11 @@ public function getNodeTypes(): array } /** + * @psalm-suppress MoreSpecificImplementedParamType + * * @param Node\Expr\New_ $node * * @throws \ReflectionException - * - * @psalm-suppress MoreSpecificImplementedParamType */ public function refactor(Node $node) {