Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 21, 2024
1 parent 14ddbc4 commit bb9fb64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use PhpParser\Node\Stmt\Declare_;
use PhpParser\Node\Stmt\Namespace_;
use PhpParser\Node\Stmt\Use_;
use PhpParser\Node\Stmt\UseUse;
use PhpParser\Node\UseItem;
use PhpParser\NodeTraverser;
use PHPStan\Type\ObjectType;
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
Expand Down Expand Up @@ -82,7 +82,7 @@ public function refactor(Node $node): ?Node
$names = $this->resolveNamesFromStaticCalls($appUsesStaticCalls);
$uses = [];
foreach ($names as $name) {
$useUse = new \PhpParser\Node\UseItem(new Name($name));
$useUse = new UseItem(new Name($name));
$uses[] = new Use_([$useUse]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

use Cake\Utility\Inflector;
use PhpParser\Node;
use PhpParser\Node\ArrayItem;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayItem;
use PhpParser\Node\PropertyItem;
use PhpParser\Node\Scalar\String_;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\Stmt\PropertyProperty;
use Rector\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
Expand Down Expand Up @@ -76,15 +76,15 @@ public function refactor(Node $node): ?Node
return $node;
}

private function refactorPropertyWithArrayDefault(\PhpParser\Node\PropertyItem $propertyProperty): void
private function refactorPropertyWithArrayDefault(PropertyItem $propertyProperty): void
{
if (! $propertyProperty->default instanceof Array_) {
return;
}

$array = $propertyProperty->default;
foreach ($array->items as $arrayItem) {
if (! $arrayItem instanceof \PhpParser\Node\ArrayItem) {
if (! $arrayItem instanceof ArrayItem) {
continue;
}

Expand Down

0 comments on commit bb9fb64

Please sign in to comment.