diff --git a/src/PhpDoc/StubValidator.php b/src/PhpDoc/StubValidator.php index 3a3a395b6d..c1aade0242 100644 --- a/src/PhpDoc/StubValidator.php +++ b/src/PhpDoc/StubValidator.php @@ -15,6 +15,7 @@ use PHPStan\Reflection\ReflectionProvider; use PHPStan\Reflection\ReflectionProviderStaticAccessor; use PHPStan\Rules\ClassCaseSensitivityCheck; +use PHPStan\Rules\Classes\DuplicateDeclarationRule; use PHPStan\Rules\Classes\ExistingClassesInClassImplementsRule; use PHPStan\Rules\Classes\ExistingClassesInInterfaceExtendsRule; use PHPStan\Rules\Classes\ExistingClassInClassExtendsRule; @@ -155,6 +156,7 @@ private function getRuleRegistry(Container $container): RuleRegistry new \PHPStan\Rules\Functions\ExistingClassesInTypehintsRule($functionDefinitionCheck), new ExistingClassesInPropertiesRule($reflectionProvider, $classCaseSensitivityCheck, $unresolvableTypeHelper, $phpVersion, true, false), new OverridingMethodRule($phpVersion, new MethodSignatureRule(true, true), true, new MethodParameterComparisonHelper($phpVersion)), + new DuplicateDeclarationRule(), // level 2 new ClassAncestorsRule($genericAncestorsCheck, $crossCheckInterfacesHelper),