Updated Rector to commit e2fb0079bcbfc5891395aa177955bfa325d7f1ba

e2fb0079bc Do not add space if empty string (#868)
This commit is contained in:
Tomas Votruba 2021-09-12 10:31:48 +00:00
parent 87c06a71d8
commit 57a0ba415f
6 changed files with 24 additions and 23 deletions

View File

@ -50,7 +50,7 @@ final class PhpDocInfoPrinter
/**
* @var string Uses a hardcoded unix-newline since most codes use it (even on windows) - otherwise we would need to normalize newlines
*/
private const NEWLINE_WITH_ASTERISK = "\n" . ' * ';
private const NEWLINE_WITH_ASTERISK = "\n" . ' *';
/**
* @see https://regex101.com/r/WR3goY/1/
* @var string
@ -190,7 +190,7 @@ final class PhpDocInfoPrinter
$printedNode = (string) $phpDocChildNode;
// remove extra space between tags
$printedNode = \RectorPrefix20210912\Nette\Utils\Strings::replace($printedNode, self::TAG_AND_SPACE_REGEX, '$1(');
return self::NEWLINE_WITH_ASTERISK . $printedNode;
return self::NEWLINE_WITH_ASTERISK . ($printedNode === '' ? '' : ' ' . $printedNode);
}
}
/** @var StartAndEnd|null $startAndEnd */
@ -275,9 +275,10 @@ final class PhpDocInfoPrinter
}
private function standardPrintPhpDocChildNode(\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocChildNode $phpDocChildNode) : string
{
$printedNode = (string) $phpDocChildNode;
if ($this->getCurrentPhpDocInfo()->isSingleLine()) {
return ' ' . $phpDocChildNode;
return ' ' . $printedNode;
}
return self::NEWLINE_WITH_ASTERISK . $phpDocChildNode;
return self::NEWLINE_WITH_ASTERISK . ($printedNode === '' ? '' : ' ' . $printedNode);
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '5cb0918b5d8de5ff4a20545edd4d3ebeaea629db';
public const PACKAGE_VERSION = 'e2fb0079bcbfc5891395aa177955bfa325d7f1ba';
/**
* @var string
*/
public const RELEASE_DATE = '2021-09-12 00:16:54';
public const RELEASE_DATE = '2021-09-12 12:19:42';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20210912\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91::getLoader();
return ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91
class ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire6d963fccced729ae8c8920adc1aa7b91($fileIdentifier, $file);
composerRequire662957e25ecf79ea9d6c43457cabf8a4($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire6d963fccced729ae8c8920adc1aa7b91($fileIdentifier, $file)
function composerRequire662957e25ecf79ea9d6c43457cabf8a4($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91
class ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3858,9 +3858,9 @@ class ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit6d963fccced729ae8c8920adc1aa7b91::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit662957e25ecf79ea9d6c43457cabf8a4::$classMap;
}, null, ClassLoader::class);
}

View File

@ -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('RectorPrefix20210912\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91', false) && !interface_exists('ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91', false) && !trait_exists('ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91', false)) {
spl_autoload_call('RectorPrefix20210912\ComposerAutoloaderInit6d963fccced729ae8c8920adc1aa7b91');
if (!class_exists('ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4', false) && !interface_exists('ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4', false) && !trait_exists('ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4', false)) {
spl_autoload_call('RectorPrefix20210912\ComposerAutoloaderInit662957e25ecf79ea9d6c43457cabf8a4');
}
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('RectorPrefix20210912\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3311,9 +3311,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20210912\print_node(...func_get_args());
}
}
if (!function_exists('composerRequire6d963fccced729ae8c8920adc1aa7b91')) {
function composerRequire6d963fccced729ae8c8920adc1aa7b91() {
return \RectorPrefix20210912\composerRequire6d963fccced729ae8c8920adc1aa7b91(...func_get_args());
if (!function_exists('composerRequire662957e25ecf79ea9d6c43457cabf8a4')) {
function composerRequire662957e25ecf79ea9d6c43457cabf8a4() {
return \RectorPrefix20210912\composerRequire662957e25ecf79ea9d6c43457cabf8a4(...func_get_args());
}
}
if (!function_exists('parseArgs')) {