[automated] Apply Coding Standard (#833)

Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
This commit is contained in:
Tomas Votruba 2021-09-05 02:15:30 +02:00 committed by GitHub
parent 3c534be587
commit 5b3b527a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 11 deletions

View File

@ -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)

View File

@ -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;

View File

@ -181,8 +181,7 @@ CODE_SAMPLE
private function processRemoveParamTypeFromMethod(
ClassReflection $classReflection,
ClassMethod $classMethod
): ?ClassMethod
{
): ?ClassMethod {
if ($this->shouldSkip($classReflection, $classMethod)) {
return null;
}

View File

@ -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;
}
}