Skip to content

Commit 7b4e3f2

Browse files
committed
Updated PHPStan Rules to commit 742fe63445994d613977850ffbc8ccfb2c72d8cd
deprecated-packages/symplify@742fe63 remove configurable rule
1 parent 0dd70b5 commit 7b4e3f2

20 files changed

+27
-34
lines changed

.github/workflows/tests.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,11 @@ jobs:
2121
# get current dev-main version
2222
- run: composer require symplify/phpstan-rules:@dev --dev
2323

24-
- run: vendor/bin/phpstan analyze src-for-tests/SomeClass.php --configuration phpstan-for-tests.neon
24+
# prepare local files
25+
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/phpstan-for-tests.neon
26+
- run: wget https://raw.githubusercontent.com/symplify/phpstan-rules/main/src-for-tests/SomeClass.php
27+
28+
- run: vendor/bin/phpstan analyze SomeClass.php --configuration phpstan-for-tests.neon
29+
30+
31+

packages/CognitiveComplexity/Rules/ClassLikeCognitiveComplexityRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @see \Symplify\PHPStanRules\Tests\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule\ClassLikeCognitiveComplexityRuleTest
2323
*/
24-
final class ClassLikeCognitiveComplexityRule implements Rule, ConfigurableRuleInterface
24+
final class ClassLikeCognitiveComplexityRule implements Rule
2525
{
2626
/**
2727
* @var string

packages/CognitiveComplexity/Rules/FunctionLikeCognitiveComplexityRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*
3232
* @see \Symplify\PHPStanRules\Tests\CognitiveComplexity\Rules\FunctionLikeCognitiveComplexityRule\FunctionLikeCognitiveComplexityRuleTest
3333
*/
34-
final class FunctionLikeCognitiveComplexityRule implements Rule, ConfigurableRuleInterface
34+
final class FunctionLikeCognitiveComplexityRule implements Rule
3535
{
3636
/**
3737
* @var string

packages/ObjectCalisthenics/Rules/NoChainMethodCallRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* @see \Symplify\PHPStanRules\Tests\ObjectCalisthenics\Rules\NoChainMethodCallRule\NoChainMethodCallRuleTest
2222
* @implements Rule<MethodCall>
2323
*/
24-
final class NoChainMethodCallRule implements Rule, ConfigurableRuleInterface
24+
final class NoChainMethodCallRule implements Rule
2525
{
2626
/**
2727
* @var string

packages/ObjectCalisthenics/Rules/NoShortNameRule.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @see \Symplify\PHPStanRules\Tests\ObjectCalisthenics\Rules\NoShortNameRule\NoShortNameRuleTest
2626
*/
27-
final class NoShortNameRule extends AbstractSymplifyRule implements ConfigurableRuleInterface
27+
final class NoShortNameRule extends AbstractSymplifyRule
2828
{
2929
/**
3030
* @var string
@@ -38,7 +38,6 @@ final class NoShortNameRule extends AbstractSymplifyRule implements Configurable
3838
* @var string[]
3939
*/
4040
private $allowedShortNames = ['i', 'j', 'y', 'z'];
41-
4241
/**
4342
* @param string[] $allowedShortNames
4443
*/
@@ -47,7 +46,6 @@ public function __construct(int $minNameLength, array $allowedShortNames = ['i',
4746
$this->minNameLength = $minNameLength;
4847
$this->allowedShortNames = $allowedShortNames;
4948
}
50-
5149
/**
5250
* @return array<class-string<Node>>
5351
*/
@@ -63,7 +61,6 @@ public function getNodeTypes(): array
6361
Param::class,
6462
];
6563
}
66-
6764
/**
6865
* @param ClassLike|Function_|ClassMethod|Const_|PropertyProperty|Variable|Param $node
6966
* @return array<int, string>
@@ -90,7 +87,6 @@ public function process(Node $node, Scope $scope): array
9087
$errorMessage = sprintf(self::ERROR_MESSAGE, $name, $this->minNameLength);
9188
return [$errorMessage];
9289
}
93-
9490
public function getRuleDefinition(): RuleDefinition
9591
{
9692
return new RuleDefinition(self::ERROR_MESSAGE, [
@@ -113,7 +109,6 @@ function isClass()
113109
),
114110
]);
115111
}
116-
117112
/**
118113
* @return string[]
119114
*/
@@ -131,7 +126,6 @@ private function processVariable(Variable $variable): array
131126
$errorMessage = sprintf(self::ERROR_MESSAGE, $variableName, $this->minNameLength);
132127
return [$errorMessage];
133128
}
134-
135129
private function isNameValid(string $name): bool
136130
{
137131
if (Strings::length($name) >= $this->minNameLength) {

src/Rules/ClassExtendingExclusiveNamespaceRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @see \Symplify\PHPStanRules\Tests\Rules\ClassExtendingExclusiveNamespaceRule\ClassExtendingExclusiveNamespaceRuleTest
2222
*/
23-
final class ClassExtendingExclusiveNamespaceRule implements ConfigurableRuleInterface, Rule
23+
final class ClassExtendingExclusiveNamespaceRule implements Rule
2424
{
2525
/**
2626
* @var string

src/Rules/ClassNameRespectsParentSuffixRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* @see \Symplify\PHPStanRules\Tests\Rules\ClassNameRespectsParentSuffixRule\ClassNameRespectsParentSuffixRuleTest
2929
*/
30-
final class ClassNameRespectsParentSuffixRule implements Rule, ConfigurableRuleInterface
30+
final class ClassNameRespectsParentSuffixRule implements Rule
3131
{
3232
/**
3333
* @var string

src/Rules/Enum/EmbeddedEnumClassConstSpotterRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @see \Symplify\PHPStanRules\Tests\Rules\Enum\EmbeddedEnumClassConstSpotterRule\EmbeddedEnumClassConstSpotterRuleTest
2222
*/
23-
final class EmbeddedEnumClassConstSpotterRule implements Rule, ConfigurableRuleInterface
23+
final class EmbeddedEnumClassConstSpotterRule implements Rule
2424
{
2525
/**
2626
* @var string

src/Rules/Enum/RequireConstantInMethodCallPositionRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* @see \Symplify\PHPStanRules\Tests\Rules\Enum\RequireConstantInMethodCallPositionRule\RequireConstantInMethodCallPositionRuleTest
2323
*/
24-
final class RequireConstantInMethodCallPositionRule implements Rule, ConfigurableRuleInterface
24+
final class RequireConstantInMethodCallPositionRule implements Rule
2525
{
2626
/**
2727
* @var string

src/Rules/Enum/RequireNewArgumentConstantRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/**
2121
* @see \Symplify\PHPStanRules\Tests\Rules\Enum\RequireNewArgumentConstantRule\RequireNewArgumentConstantRuleTest
2222
*/
23-
final class RequireNewArgumentConstantRule implements Rule, ConfigurableRuleInterface
23+
final class RequireNewArgumentConstantRule implements Rule
2424
{
2525
/**
2626
* @var string

0 commit comments

Comments
 (0)