Skip to content

Commit

Permalink
chore(php-cs-fixer): update php-cs-fixer configuration
Browse files Browse the repository at this point in the history
- Added 'phpdoc_order' rule to define the order of phpdoc tags
- Updated 'phpdoc_to_param_type' rule to include scalar and union types
  • Loading branch information
guanguans committed Mar 12, 2024
1 parent 21328b8 commit f160d0a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
13 changes: 13 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Rectors/HasHttpClientDocCommentRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public function getNodeTypes(): array
}

/**
* @psalm-suppress MoreSpecificImplementedParamType
*
* @param Trait_ $node
*
* @throws \ReflectionException
*
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function refactor(Node $node)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Rectors/HasOptionsDocCommentRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ public function getNodeTypes(): array
}

/**
* @psalm-suppress MoreSpecificImplementedParamType
*
* @param Class_ $node
*
* @throws \ReflectionException
*
* @psalm-suppress MoreSpecificImplementedParamType
*/
public function refactor(Node $node)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Foundation/Rectors/ToInternalExceptionRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit f160d0a

Please sign in to comment.