Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move type-declaration-related rules to type-perfect package #128

Merged
merged 11 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Sets are bunch of rules grouped by a common area, e.g. improve naming. You can p
```yaml
includes:
- vendor/symplify/phpstan-rules/config/code-complexity-rules.neon
- vendor/symplify/phpstan-rules/config/collector-rules.neon
- vendor/symplify/phpstan-rules/config/naming-rules.neon
- vendor/symplify/phpstan-rules/config/regex-rules.neon
- vendor/symplify/phpstan-rules/config/static-rules.neon
Expand Down
2 changes: 0 additions & 2 deletions config/code-complexity-rules.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
rules:
- Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule
- Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
- Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule
18 changes: 0 additions & 18 deletions config/collector-rules.neon

This file was deleted.

1 change: 0 additions & 1 deletion config/naming-rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ rules:
- Symplify\PHPStanRules\Rules\NoReturnSetterMethodRule
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
- Symplify\PHPStanRules\Rules\ClassNameRespectsParentSuffixRule
- Symplify\PHPStanRules\Rules\CheckTypehintCallerTypeRule
- Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule
9 changes: 0 additions & 9 deletions config/services/services.neon
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ services:
- Symplify\PHPStanRules\NodeAnalyzer\EnumAnalyzer
- Symplify\PHPStanRules\NodeAnalyzer\RegexFuncCallAnalyzer
- Symplify\PHPStanRules\NodeAnalyzer\RegexStaticCallAnalyzer
- Symplify\PHPStanRules\NodeFinder\ClassMethodNodeFinder
- Symplify\PHPStanRules\NodeFinder\MethodCallNodeFinder
- Symplify\PHPStanRules\NodeFinder\ReturnNodeFinder
- Symplify\PHPStanRules\ParentClassMethodNodeResolver
- Symplify\PHPStanRules\PhpDoc\ApiDocStmtAnalyzer
- Symplify\PHPStanRules\PhpDoc\BarePhpDocParser
- Symplify\PHPStanRules\PhpDoc\PhpDocResolver
- Symplify\PHPStanRules\Printer\NodeComparator
- Symplify\PHPStanRules\Reflection\MethodNodeAnalyser
- Symplify\PHPStanRules\TypeAnalyzer\CallableTypeAnalyzer
- Symplify\PHPStanRules\Matcher\Collector\PublicClassMethodMatcher
- Symplify\PHPStanRules\Matcher\ClassMethodCallReferenceResolver
- Symplify\PHPStanRules\Printer\CollectorMetadataPrinter
7 changes: 0 additions & 7 deletions config/static-rules.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,17 @@ rules:
- Symplify\PHPStanRules\Rules\Domain\RequireExceptionNamespaceRule
- Symplify\PHPStanRules\Rules\Domain\RequireAttributeNamespaceRule
- Symplify\PHPStanRules\Rules\Enum\RequireUniqueEnumConstantRule
- Symplify\PHPStanRules\Rules\ForbiddenParamTypeRemovalRule
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule

# paths
- Symplify\PHPStanRules\Rules\NoMissingDirPathRule
- Symplify\PHPStanRules\Rules\NoReferenceRule
- Symplify\PHPStanRules\Rules\NoArrayAccessOnObjectRule

- Symplify\PHPStanRules\Rules\NoNullableArrayPropertyRule

# dead-code
- Symplify\PHPStanRules\Rules\NoIssetOnObjectRule

# explicit naming
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule

# comlexity
- Symplify\PHPStanRules\Rules\NarrowType\NoReturnFalseInNonBoolClassMethodRule

- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
- Symplify\PHPStanRules\Rules\CheckRequiredInterfaceInContractNamespaceRule
Expand Down
1 change: 0 additions & 1 deletion config/symplify-rules.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
includes:
- code-complexity-rules.neon
- collector-rules.neon
- configurable-rules.neon
- naming-rules.neon
- regex-rules.neon
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ parameters:

# needless generics
- '#Class Symplify\\PHPStanRules\\(.*?)Rule implements generic interface PHPStan\\Rules\\Rule but does not specify its types\: TNodeType#'
- '#Method (.*?)::getCollectors\(\) return type with generic interface PHPStan\\Collectors\\Collector does not specify its types\: TNodeType, TValue#'

- '#Parameter \#1 \$values of method Symplify\\PHPStanRules\\Rules\\Enum\\RequireUniqueEnumConstantRule\:\:filterDuplicatedValues\(\) expects array<int\|string>, array<bool\|float\|int\|string> given#'

Expand All @@ -44,8 +43,6 @@ parameters:

- '#Method Symplify\\PHPStanRules\\NodeFinder\\TypeAwareNodeFinder\:\:findFirstInstanceOf\(\) should return \(TNode of PhpParser\\Node\)\|null but returns PhpParser\\Node\|null#'

- '#Method Symplify\\PHPStanRules\\NodeFinder\\MethodCallNodeFinder\:\:findUsages\(\) should return array<PhpParser\\Node\\Expr\\MethodCall> but returns array<PhpParser\\Node>#'

# overly detailed
- '#Class Symplify\\PHPStanRules\\(.*?) extends generic class PHPStan\\Testing\\RuleTestCase but does not specify its types\: TRule#'
- '#Method Symplify\\PHPStanRules\\(.*?)\:\:getRule\(\) return type with generic interface PHPStan\\Rules\\Rule does not specify its types\: TNodeType#'
Expand Down
71 changes: 0 additions & 71 deletions src/Collector/ClassMethod/PublicClassMethodParamTypesCollector.php

This file was deleted.

59 changes: 0 additions & 59 deletions src/Collector/MethodCall/MethodCallArgTypesCollector.php

This file was deleted.

58 changes: 0 additions & 58 deletions src/Collector/MethodCallableNode/MethodCallableCollector.php

This file was deleted.

13 changes: 0 additions & 13 deletions src/Enum/Types/ResolvedTypes.php

This file was deleted.

53 changes: 0 additions & 53 deletions src/Matcher/ClassMethodCallReferenceResolver.php

This file was deleted.

Loading
Loading