File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5656 "symplify/phpstan-rules" : " ^14.12.3" ,
5757 "tomasvotruba/class-leak" : " ^2.1" ,
5858 "tomasvotruba/fast-unit" : " ^0.1" ,
59- "tomasvotruba/type-coverage" : " ^2.3" ,
59+ "tomasvotruba/type-coverage" : " ^2.3.5 " ,
6060 "tomasvotruba/unused-public" : " ^2.2" ,
6161 "tracy/tracy" : " ^2.12"
6262 },
Original file line number Diff line number Diff line change @@ -425,15 +425,10 @@ parameters:
425425 message : ' #Parameters should have "PhpParser\\Node\\Stmt\\ClassMethod" types as the only types passed to this method#'
426426 path : src/Reflection/ClassModifierChecker.php
427427
428- # false positive - should be fixed
429- -
430- identifier : typePerfect.narrowPublicClassMethodParamType
431- message : ' #Parameters should have "PhpParser\\Node\\Expr\\Closure" types as the only types passed to this method#'
432-
433- -
434- identifier : typePerfect.narrowPublicClassMethodParamType
435- message : ' #Parameters should have "PhpParser\\Node\\Stmt\\ClassMethod" types as the only types passed to this method#'
436- path : src/VendorLocker/ParentClassMethodTypeOverrideGuard.php
428+ # -
429+ # identifier: typePerfect.narrowPublicClassMethodParamType
430+ # message: '#Parameters should have "PhpParser\\Node\\Stmt\\ClassMethod" types as the only types passed to this method#'
431+ # path: src/VendorLocker/ParentClassMethodTypeOverrideGuard.php
437432
438433 -
439434 identifier : typePerfect.narrowReturnObjectType
Original file line number Diff line number Diff line change 55namespace Rector \VendorLocker ;
66
77use PhpParser \Node ;
8- use PhpParser \Node \Stmt \ClassLike ;
98use PhpParser \Node \Stmt \ClassMethod ;
109use PHPStan \Reflection \ClassReflection ;
1110use PHPStan \Reflection \MethodReflection ;
@@ -39,7 +38,7 @@ public function __construct(
3938 * classes, so type-declaration rules must leave it untouched. Final classes are never guarded,
4039 * as they cannot be extended.
4140 */
42- public function isTypeGuardedClass (ClassLike |ClassMethod $ node ): bool
41+ public function isTypeGuardedClass (Node \ Stmt \ Class_ | Node \ Stmt \ Interface_ |ClassMethod $ node ): bool
4342 {
4443 $ guardedClasses = SimpleParameterProvider ::provideArrayParameter (Option::TYPE_GUARDED_CLASSES );
4544 if ($ guardedClasses === []) {
@@ -63,7 +62,7 @@ public function isTypeGuardedClass(ClassLike|ClassMethod $node): bool
6362 );
6463 }
6564
66- public function hasParentClassMethod (ClassMethod | MethodReflection $ classMethod ): bool
65+ public function hasParentClassMethod (ClassMethod $ classMethod ): bool
6766 {
6867 try {
6968 $ parentClassMethod = $ this ->resolveParentClassMethod ($ classMethod );
You can’t perform that action at this time.
0 commit comments