mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 00:10:51 +00:00
[automated] Apply Coding Standard (#833)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
This commit is contained in:
parent
3c534be587
commit
5b3b527a51
|
@ -24,7 +24,6 @@ use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
|
|||
use Rector\Comments\CommentRemover;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\DeadCode\NodeAnalyzer\ExprUsedInNodeAnalyzer;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Symplify\PackageBuilder\Php\TypeChecker;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
|
@ -133,7 +132,7 @@ CODE_SAMPLE
|
|||
|
||||
private function isUsedInNextNodeWithExtractPreviouslyCalled(Node $node, string $variableName): bool
|
||||
{
|
||||
$variable = new Variable($variableName);
|
||||
$variable = new Variable($variableName);
|
||||
$isUsedInNextNode = (bool) $this->betterNodeFinder->findFirstNext(
|
||||
$node,
|
||||
fn (Node $node): bool => $this->exprUsedInNodeAnalyzer->isUsed($node, $variable)
|
||||
|
|
|
@ -56,8 +56,7 @@ final class OverrideFromAnonymousClassMethodAnalyzer
|
|||
private function resolveClassReflectionWithNotPrivateMethod(
|
||||
FullyQualified $fullyQualified,
|
||||
ClassMethod $classMethod
|
||||
): ?ClassReflection
|
||||
{
|
||||
): ?ClassReflection {
|
||||
$ancestorClassLike = $fullyQualified->toString();
|
||||
if (! $this->reflectionProvider->hasClass($ancestorClassLike)) {
|
||||
return null;
|
||||
|
|
|
@ -181,8 +181,7 @@ CODE_SAMPLE
|
|||
private function processRemoveParamTypeFromMethod(
|
||||
ClassReflection $classReflection,
|
||||
ClassMethod $classMethod
|
||||
): ?ClassMethod
|
||||
{
|
||||
): ?ClassMethod {
|
||||
if ($this->shouldSkip($classReflection, $classMethod)) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -95,6 +95,11 @@ CODE_SAMPLE
|
|||
return $node;
|
||||
}
|
||||
|
||||
public function provideMinPhpVersion(): int
|
||||
{
|
||||
return PhpVersionFeature::READONLY_PROPERTY;
|
||||
}
|
||||
|
||||
private function refactorParam(Param $param): Param | null
|
||||
{
|
||||
if ($param->flags === 0) {
|
||||
|
@ -113,9 +118,4 @@ CODE_SAMPLE
|
|||
$this->visibilityManipulator->makeReadonly($param);
|
||||
return $param;
|
||||
}
|
||||
|
||||
public function provideMinPhpVersion(): int
|
||||
{
|
||||
return PhpVersionFeature::READONLY_PROPERTY;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user