mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 3b84030d093b9896615f640ad0e361c923af8953
3b84030d09
[TypeDeclaration] Skip return void in abstract empty class in AddVoidReturnTypeWhereNoReturnRector (#5311)
This commit is contained in:
parent
123030c782
commit
93efaa2dcc
|
@ -115,7 +115,7 @@ CODE_SAMPLE
|
|||
if ($functionLike->isProtected()) {
|
||||
return !$this->isInsideFinalClass($functionLike);
|
||||
}
|
||||
return \false;
|
||||
return $this->isInsideAbstractClass($functionLike) && $functionLike->getStmts() === [];
|
||||
}
|
||||
private function isInsideFinalClass(ClassMethod $classMethod) : bool
|
||||
{
|
||||
|
@ -125,4 +125,12 @@ CODE_SAMPLE
|
|||
}
|
||||
return $classReflection->isFinalByKeyword();
|
||||
}
|
||||
private function isInsideAbstractClass(ClassMethod $classMethod) : bool
|
||||
{
|
||||
$classReflection = $this->reflectionResolver->resolveClassReflection($classMethod);
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return \false;
|
||||
}
|
||||
return $classReflection->isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'cd9ea2c717511f81e7bb7298a62f8ea558441a37';
|
||||
public const PACKAGE_VERSION = '3b84030d093b9896615f640ad0e361c923af8953';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-12-02 13:40:42';
|
||||
public const RELEASE_DATE = '2023-12-02 19:53:58';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue