Skip to content

Commit 3b34bec

Browse files
committed
Updated Rector to commit 1afc64719771eae635df76bf5f85b225b459b3d6
rectorphp/rector-src@1afc647 Rectify (#6408)
1 parent 4261346 commit 3b34bec

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

rules/Php83/Rector/FuncCall/RemoveGetClassGetParentClassNoArgsRector.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
namespace Rector\Php83\Rector\FuncCall;
55

66
use PhpParser\Node;
7+
use PhpParser\Node\Expr\ClassConstFetch;
8+
use PhpParser\Node\Expr\FuncCall;
9+
use PhpParser\Node\Name;
10+
use PhpParser\Node\VarLikeIdentifier;
711
use Rector\Rector\AbstractRector;
812
use Rector\ValueObject\PhpVersionFeature;
913
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
@@ -16,7 +20,7 @@ final class RemoveGetClassGetParentClassNoArgsRector extends AbstractRector impl
1620
{
1721
public function getRuleDefinition() : RuleDefinition
1822
{
19-
$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'
23+
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'
2024
class Example extends StdClass {
2125
public function whoAreYou() {
2226
return get_class() . ' daughter of ' . get_parent_class();
@@ -31,17 +35,16 @@ public function whoAreYou() {
3135
}
3236
NEW_CODE_SAMPLE
3337
)]);
34-
return $r;
3538
}
3639
/**
3740
* @return array<class-string<Node>>
3841
*/
3942
public function getNodeTypes() : array
4043
{
41-
return [Node\Expr\FuncCall::class];
44+
return [FuncCall::class];
4245
}
4346
/**
44-
* @param Node\Expr\FuncCall $node
47+
* @param FuncCall $node
4548
*/
4649
public function refactor(Node $node) : ?Node
4750
{
@@ -59,7 +62,7 @@ public function refactor(Node $node) : ?Node
5962
$target = 'parent';
6063
}
6164
if ($target !== null) {
62-
return new Node\Expr\ClassConstFetch(new Node\Name([$target]), new Node\VarLikeIdentifier('class'));
65+
return new ClassConstFetch(new Name([$target]), new VarLikeIdentifier('class'));
6366
}
6467
return null;
6568
}

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = 'f7ea3dbfeb4e02ab42442dd9e90283e8af098e4f';
22+
public const PACKAGE_VERSION = '1afc64719771eae635df76bf5f85b225b459b3d6';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2024-11-04 23:01:54';
27+
public const RELEASE_DATE = '2024-11-04 22:15:08';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)