Skip to content

Commit dfb9927

Browse files
committed
static fixes
1 parent d50d8c0 commit dfb9927

File tree

5 files changed

+22
-5
lines changed

5 files changed

+22
-5
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"phpunit/phpunit": "^11.5",
1414
"rector/rector-src": "dev-main",
1515
"symplify/easy-coding-standard": "^12.3",
16+
"symplify/phpstan-extensions": "^12.0",
1617
"symplify/phpstan-rules": "^14.9",
1718
"symplify/rule-doc-generator": "^12.2",
1819
"symplify/vendor-patches": "^11.5",

phpstan.neon

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,21 @@ parameters:
7575
-
7676
identifier: deadCode.unreachable
7777
path: rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php
78+
79+
# cached printed nodes
80+
-
81+
identifier: rector.noPropertyNodeAssign
82+
paths:
83+
- rules/DowngradePhp83/Rector/FuncCall/DowngradeJsonValidateRector.php
84+
- rules/DowngradePhp81/Rector/FuncCall/DowngradeArrayIsListRector.php
85+
- rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php
86+
87+
# already registered in PHP 8.1 set
88+
-
89+
identifier: rector.upgradeDowngradeRegisteredInSet
90+
path: rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php
91+
92+
# valid stmts property check
93+
-
94+
identifier: symplify.forbiddenFuncCall
95+
path: rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php

rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ public function run($items)
8080
*/
8181
public function getNodeTypes(): array
8282
{
83-
$stmtsAware = NodeGroup::STMTS_AWARE;
84-
return [...$stmtsAware, Switch_::class, Return_::class, Expression::class, Echo_::class];
83+
return [...NodeGroup::STMTS_AWARE, Switch_::class, Return_::class, Expression::class, Echo_::class];
8584
}
8685

8786
/**

rules/DowngradePhp81/Rector/FuncCall/DowngradeHashAlgorithmXxHashRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
final class DowngradeHashAlgorithmXxHashRector extends AbstractRector
3333
{
3434
/**
35-
* @var array<string, string>
35+
* @var array<string, int>
3636
*/
3737
private const HASH_ALGORITHMS_TO_DOWNGRADE = [
3838
'xxh32' => MHASH_XXH32,

rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
2222

2323
/**
24-
* @see https://wiki.php.net/rfc/pipe-operator-v3
25-
*
2624
* @see \Rector\Tests\DowngradePhp85\Rector\StmtsAwareInterface\DowngradePipeOperatorRector\DowngradePipeOperatorRectorTest
25+
* @see https://wiki.php.net/rfc/pipe-operator-v3
2726
*/
2827
final class DowngradePipeOperatorRector extends AbstractRector
2928
{

0 commit comments

Comments
 (0)