Skip to content

Commit

Permalink
Updated Rector to commit 1afc64719771eae635df76bf5f85b225b459b3d6
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Nov 4, 2024
1 parent 4261346 commit 3b34bec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
namespace Rector\Php83\Rector\FuncCall;

use PhpParser\Node;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use PhpParser\Node\VarLikeIdentifier;
use Rector\Rector\AbstractRector;
use Rector\ValueObject\PhpVersionFeature;
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
Expand All @@ -16,7 +20,7 @@ final class RemoveGetClassGetParentClassNoArgsRector extends AbstractRector impl
{
public function getRuleDefinition() : RuleDefinition
{
$r = new RuleDefinition('Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class.', [new CodeSample(<<<'OLD_CODE_SAMPLE'
return new RuleDefinition('Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class.', [new CodeSample(<<<'OLD_CODE_SAMPLE'
class Example extends StdClass {
public function whoAreYou() {
return get_class() . ' daughter of ' . get_parent_class();
Expand All @@ -31,17 +35,16 @@ public function whoAreYou() {
}
NEW_CODE_SAMPLE
)]);
return $r;
}
/**
* @return array<class-string<Node>>
*/
public function getNodeTypes() : array
{
return [Node\Expr\FuncCall::class];
return [FuncCall::class];
}
/**
* @param Node\Expr\FuncCall $node
* @param FuncCall $node
*/
public function refactor(Node $node) : ?Node
{
Expand All @@ -59,7 +62,7 @@ public function refactor(Node $node) : ?Node
$target = 'parent';
}
if ($target !== null) {
return new Node\Expr\ClassConstFetch(new Node\Name([$target]), new Node\VarLikeIdentifier('class'));
return new ClassConstFetch(new Name([$target]), new VarLikeIdentifier('class'));
}
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'f7ea3dbfeb4e02ab42442dd9e90283e8af098e4f';
public const PACKAGE_VERSION = '1afc64719771eae635df76bf5f85b225b459b3d6';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-11-04 23:01:54';
public const RELEASE_DATE = '2024-11-04 22:15:08';
/**
* @var int
*/
Expand Down

0 comments on commit 3b34bec

Please sign in to comment.