mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 7fd42ea923ebaf88f9c05cd838224a65a43c92a3
7fd42ea923
add possibility to add short doc name (#2032)
This commit is contained in:
parent
27ffd0051e
commit
4ea9b41528
@ -24,6 +24,7 @@ use Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode;
|
||||
use Rector\BetterPhpDocParser\PhpDocNodeFinder\PhpDocNodeByTypeFinder;
|
||||
use Rector\BetterPhpDocParser\PhpDocNodeVisitor\ChangedPhpDocNodeVisitor;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Parser\BetterTokenIterator;
|
||||
use Rector\BetterPhpDocParser\ValueObject\Type\ShortenedIdentifierTypeNode;
|
||||
use Rector\ChangesReporting\Collector\RectorChangeCollector;
|
||||
use Rector\Core\Configuration\CurrentNodeProvider;
|
||||
use Rector\StaticTypeMapper\StaticTypeMapper;
|
||||
@ -331,7 +332,12 @@ final class PhpDocInfo
|
||||
public function addTagValueNode(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode $phpDocTagValueNode) : void
|
||||
{
|
||||
if ($phpDocTagValueNode instanceof \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode) {
|
||||
$spacelessPhpDocTagNode = new \Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode('@\\' . $phpDocTagValueNode->identifierTypeNode, $phpDocTagValueNode);
|
||||
if ($phpDocTagValueNode->identifierTypeNode instanceof \Rector\BetterPhpDocParser\ValueObject\Type\ShortenedIdentifierTypeNode) {
|
||||
$name = '@' . $phpDocTagValueNode->identifierTypeNode;
|
||||
} else {
|
||||
$name = '@\\' . $phpDocTagValueNode->identifierTypeNode;
|
||||
}
|
||||
$spacelessPhpDocTagNode = new \Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode($name, $phpDocTagValueNode);
|
||||
$this->addPhpDocTagNode($spacelessPhpDocTagNode);
|
||||
return;
|
||||
}
|
||||
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\ValueObject\Type;
|
||||
|
||||
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
||||
use Stringable;
|
||||
final class ShortenedIdentifierTypeNode extends \PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode
|
||||
{
|
||||
}
|
@ -16,11 +16,11 @@ final class VersionResolver
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '211a3b6bd05abdd4d9e407c9b928d1c19f2b033b';
|
||||
public const PACKAGE_VERSION = '7fd42ea923ebaf88f9c05cd838224a65a43c92a3';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-04-09 14:29:46';
|
||||
public const RELEASE_DATE = '2022-04-09 07:59:41';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20220409\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687::getLoader();
|
||||
return ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0::getLoader();
|
||||
|
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
@ -1418,6 +1418,7 @@ return array(
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\BracketsAwareUnionTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/BracketsAwareUnionTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\EmptyGenericTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/EmptyGenericTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\FullyQualifiedIdentifierTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/FullyQualifiedIdentifierTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\ShortenedIdentifierTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/ShortenedIdentifierTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\SpacingAwareArrayTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/SpacingAwareArrayTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\SpacingAwareCallableTypeNode' => $baseDir . '/packages/BetterPhpDocParser/ValueObject/Type/SpacingAwareCallableTypeNode.php',
|
||||
'Rector\\Caching\\Cache' => $baseDir . '/packages/Caching/Cache.php',
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687
|
||||
class ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit589d4a74b93797bd6d7c1a19049af687::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitadf20ab48663808fcd4b350d546994f0::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit589d4a74b93797bd6d7c1a19049af687::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitadf20ab48663808fcd4b350d546994f0::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire589d4a74b93797bd6d7c1a19049af687($fileIdentifier, $file);
|
||||
composerRequireadf20ab48663808fcd4b350d546994f0($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire589d4a74b93797bd6d7c1a19049af687($fileIdentifier, $file)
|
||||
function composerRequireadf20ab48663808fcd4b350d546994f0($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
9
vendor/composer/autoload_static.php
vendored
9
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit589d4a74b93797bd6d7c1a19049af687
|
||||
class ComposerStaticInitadf20ab48663808fcd4b350d546994f0
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
@ -1787,6 +1787,7 @@ class ComposerStaticInit589d4a74b93797bd6d7c1a19049af687
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\BracketsAwareUnionTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/BracketsAwareUnionTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\EmptyGenericTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/EmptyGenericTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\FullyQualifiedIdentifierTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/FullyQualifiedIdentifierTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\ShortenedIdentifierTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/ShortenedIdentifierTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\SpacingAwareArrayTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/SpacingAwareArrayTypeNode.php',
|
||||
'Rector\\BetterPhpDocParser\\ValueObject\\Type\\SpacingAwareCallableTypeNode' => __DIR__ . '/../..' . '/packages/BetterPhpDocParser/ValueObject/Type/SpacingAwareCallableTypeNode.php',
|
||||
'Rector\\Caching\\Cache' => __DIR__ . '/../..' . '/packages/Caching/Cache.php',
|
||||
@ -3852,9 +3853,9 @@ class ComposerStaticInit589d4a74b93797bd6d7c1a19049af687
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit589d4a74b93797bd6d7c1a19049af687::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit589d4a74b93797bd6d7c1a19049af687::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit589d4a74b93797bd6d7c1a19049af687::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitadf20ab48663808fcd4b350d546994f0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitadf20ab48663808fcd4b350d546994f0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitadf20ab48663808fcd4b350d546994f0::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
|
||||
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
|
||||
spl_autoload_call('RectorPrefix20220409\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687', false) && !interface_exists('ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687', false) && !trait_exists('ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687', false)) {
|
||||
spl_autoload_call('RectorPrefix20220409\ComposerAutoloaderInit589d4a74b93797bd6d7c1a19049af687');
|
||||
if (!class_exists('ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0', false) && !interface_exists('ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0', false) && !trait_exists('ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0', false)) {
|
||||
spl_autoload_call('RectorPrefix20220409\ComposerAutoloaderInitadf20ab48663808fcd4b350d546994f0');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220409\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
||||
return \RectorPrefix20220409\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire589d4a74b93797bd6d7c1a19049af687')) {
|
||||
function composerRequire589d4a74b93797bd6d7c1a19049af687() {
|
||||
return \RectorPrefix20220409\composerRequire589d4a74b93797bd6d7c1a19049af687(...func_get_args());
|
||||
if (!function_exists('composerRequireadf20ab48663808fcd4b350d546994f0')) {
|
||||
function composerRequireadf20ab48663808fcd4b350d546994f0() {
|
||||
return \RectorPrefix20220409\composerRequireadf20ab48663808fcd4b350d546994f0(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user