Skip to content

Commit

Permalink
cs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 19, 2024
1 parent 0249dd8 commit 00efc4e
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion rules/DowngradePhp72/NodeManipulator/JsonConstCleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace Rector\DowngradePhp72\NodeManipulator;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
use PhpParser\Node\Expr\ConstFetch;
use PhpParser\Node\Scalar\Int_;
use Rector\Enum\JsonConstant;
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\Node\AttributeKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(

public function decorate(ClassMethod $classMethod, Param $param): void
{
if (!$param->type instanceof Node) {
if (! $param->type instanceof Node) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Rector\DowngradePhp72\Rector\FuncCall;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
Expand All @@ -15,6 +14,7 @@
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Param;
use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\ClassConst;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Rector\DowngradePhp73\Rector\FuncCall;

use PhpParser\Node\ArrayItem;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Scalar\String_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

namespace Rector\DowngradePhp73\Rector\List_;

use PhpParser\Node\ArrayItem;
use PhpParser\Node\Scalar\Int_;
use PhpParser\BuilderHelpers;
use PhpParser\Node;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\AssignRef;
use PhpParser\Node\Expr\List_;
use PhpParser\Node\Expr\Variable;
use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Expression;
use Rector\Rector\AbstractRector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp73\Rector\String_;

use PhpParser\Node\Scalar\InterpolatedString;
use PhpParser\Node;
use PhpParser\Node\Scalar\InterpolatedString;
use PhpParser\Node\Scalar\String_;
use Rector\DowngradePhp73\Tokenizer\FollowedByNewlineOnlyMaybeWithSemicolonAnalyzer;
use Rector\NodeTypeResolver\Node\AttributeKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp74\Rector\Array_;

use PhpParser\Node\ArrayItem;
use PhpParser\Node;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Identifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp74\Rector\ArrowFunction;

use PhpParser\Node\ClosureUse;
use PhpParser\Node;
use PhpParser\Node\ClosureUse;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\Node\Expr\Assign;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private function isNullableParam(Param $param, ClassMethod|Function_ $functionLi
return false;
}

if (!$param->type instanceof Node) {
if (! $param->type instanceof Node) {
return false;
}

Expand Down Expand Up @@ -262,7 +262,7 @@ private function refactorParam(Param $param, ClassMethod | Function_ $functionLi

private function decorateWithDocBlock(ClassMethod | Function_ $functionLike, Param $param): void
{
if (!$param->type instanceof Node) {
if (! $param->type instanceof Node) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Rector\DowngradePhp74\Rector\LNumber;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\Float_;
use PhpParser\Node;
use PhpParser\Node\Scalar\Float_;
use PhpParser\Node\Scalar\Int_;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

namespace Rector\DowngradePhp80\Rector\ArrayDimFetch;

use PhpParser\Node\Scalar\InterpolatedString;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Scalar\InterpolatedString;
use PhpParser\Node\Scalar\MagicConst;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\Rector\AbstractRector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp80\Rector\ClassMethod;

use PhpParser\Node\ClosureUse;
use PhpParser\Node;
use PhpParser\Node\ClosureUse;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Param;
use PhpParser\Node\Stmt\ClassMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace Rector\DowngradePhp80\Rector\Class_;

use PhpParser\Node\PropertyItem;
use PhpParser\Comment;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\New_;
use PhpParser\Node\Param;
use PhpParser\Node\PropertyItem;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Expression;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Rector\DowngradePhp80\Rector\Expression;

use PhpParser\Node\ArrayItem;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\ArrowFunction;
use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\CallLike;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Rector\DowngradePhp80\Rector\FuncCall;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
Expand All @@ -21,6 +20,7 @@
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Param;
use PhpParser\Node\Scalar\Int_;
use PhpParser\Node\Scalar\String_;
use PHPStan\Type\ArrayType;
use PHPStan\Type\ClosureType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Rector\DowngradePhp80\Rector\FuncCall;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
Expand All @@ -14,6 +13,7 @@
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\UnaryMinus;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Int_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

namespace Rector\DowngradePhp80\Rector\FuncCall;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\BinaryOp\Identical;
use PhpParser\Node\Expr\BinaryOp\NotIdentical;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Int_;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp80\Rector\MethodCall;

use PhpParser\Node\ClosureUse;
use PhpParser\Node;
use PhpParser\Node\ClosureUse;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function refactor(Node $node): ?Node

private function shouldRemoveProperty(Property $property): bool
{
if (!$property->type instanceof Node) {
if (! $property->type instanceof Node) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Rector\DowngradePhp80\Rector\StaticCall;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\ArrayDimFetch;
Expand All @@ -14,6 +13,7 @@
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Expr\Ternary;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar\Int_;
use PHPStan\Type\ObjectType;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Rector\DowngradePhp81\NodeFactory;

use PhpParser\Node\ArrayItem;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\Ternary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp81\Rector\Array_;

use PhpParser\Node\ArrayItem;
use PhpParser\Node;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PHPStan\Analyser\MutatingScope;
use PHPStan\Type\ArrayType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

namespace Rector\DowngradePhp81\Rector\FuncCall;

use PhpParser\Node\ArrayItem;
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ClassConstFetch;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace Rector\DowngradePhp81\Rector\LNumber;

use PhpParser\Node\Scalar\Int_;
use PhpParser\Node;
use PhpParser\Node\Scalar\Int_;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
Expand Down
4 changes: 2 additions & 2 deletions src/PhpDocDecorator/PhpDocFromTypeDeclarationDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function decorateParam(
ClassMethod|Function_|Closure|ArrowFunction $functionLike,
array $requiredTypes
): void {
if (!$param->type instanceof Node) {
if (! $param->type instanceof Node) {
return;
}

Expand All @@ -133,7 +133,7 @@ public function decorateParamWithSpecificType(
ClassMethod|Function_|Closure|ArrowFunction $functionLike,
Type $requireType
): bool {
if (!$param->type instanceof Node) {
if (! $param->type instanceof Node) {
return false;
}

Expand Down

0 comments on commit 00efc4e

Please sign in to comment.