Updated Rector to commit af55788ca8f814c658d39444a9cefa67135805b6

af55788ca8 [PHP 5.5] Remove extra preslash in class reference, as in practice removal manually (#5338)
This commit is contained in:
Tomas Votruba 2023-12-08 11:29:59 +00:00
parent 9e3e9b62ed
commit d471c4dbd9
3 changed files with 4 additions and 11 deletions

View File

@ -4,7 +4,6 @@ declare (strict_types=1);
namespace Rector\Php55\Rector\String_;
use PhpParser\Node;
use PhpParser\Node\Expr\BinaryOp\Concat;
use PhpParser\Node\Expr\ClassConstFetch;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name\FullyQualified;
@ -82,7 +81,7 @@ CODE_SAMPLE
}
/**
* @param String_|FuncCall|ClassConst $node
* @return \PhpParser\Node\Expr\BinaryOp\Concat|\PhpParser\Node\Expr\ClassConstFetch|null|int
* @return \PhpParser\Node\Expr\ClassConstFetch|null|int
*/
public function refactor(Node $node)
{
@ -116,12 +115,6 @@ CODE_SAMPLE
return null;
}
$fullyQualified = new FullyQualified($classLikeName);
if ($classLikeName !== $node->value) {
$preSlashCount = \strlen($node->value) - \strlen($classLikeName);
$preSlash = \str_repeat('\\', $preSlashCount);
$string = new String_($preSlash);
return new Concat($string, new ClassConstFetch($fullyQualified, 'class'));
}
return new ClassConstFetch($fullyQualified, 'class');
}
/**

View File

@ -3,11 +3,11 @@
declare (strict_types=1);
namespace Rector\TypeDeclaration\Rector\Class_;
use PHPStan\Type\TypeWithClassName;
use PhpParser\Node;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt\Class_;
use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode;
use PHPStan\Type\TypeWithClassName;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo;
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
use Rector\Comments\NodeDocBlock\DocBlockUpdater;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '9e39db80cf2a763ae6006b3747feb69d82ade52d';
public const PACKAGE_VERSION = 'af55788ca8f814c658d39444a9cefa67135805b6';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-07 11:35:49';
public const RELEASE_DATE = '2023-12-08 11:27:51';
/**
* @var int
*/