mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-02 01:10:53 +00:00
Updated Rector to commit 15e12b69cd
15e12b69cd
[PHP 8.0] Fix quotes in attribute multiline text (#417)
This commit is contained in:
parent
cf13295052
commit
75cf1ea440
|
@ -79,10 +79,11 @@ final class PlainValueParser
|
|||
return $this->parseNestedDoctrineAnnotationTagValueNode($currentTokenValue, $tokenIterator);
|
||||
}
|
||||
$start = $tokenIterator->currentPosition();
|
||||
if ($tokenIterator->isCurrentTokenType(\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_PHPDOC_EOL)) {
|
||||
while ($tokenIterator->isCurrentTokenTypes([\PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_PHPDOC_EOL, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_IDENTIFIER, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_COLON, \PHPStan\PhpDocParser\Lexer\Lexer::TOKEN_SINGLE_QUOTED_STRING])) {
|
||||
// from "quote to quote"
|
||||
if ($currentTokenValue === '"') {
|
||||
do {
|
||||
$tokenIterator->next();
|
||||
}
|
||||
} while (\strpos($tokenIterator->currentTokenValue(), '"') === \false);
|
||||
}
|
||||
$end = $tokenIterator->currentPosition();
|
||||
if ($start + 1 < $end) {
|
||||
|
|
|
@ -12,7 +12,6 @@ use PhpParser\Node\Expr\New_;
|
|||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Return_;
|
||||
use PhpParser\NodeFinder;
|
||||
|
@ -210,13 +209,6 @@ final class FluentChainMethodCallNodeAnalyzer
|
|||
}
|
||||
return null;
|
||||
}
|
||||
private function isCall(\PhpParser\Node\Expr $expr) : bool
|
||||
{
|
||||
if ($expr instanceof \PhpParser\Node\Expr\MethodCall) {
|
||||
return \true;
|
||||
}
|
||||
return $expr instanceof \PhpParser\Node\Expr\StaticCall;
|
||||
}
|
||||
public function isMethodCallReturnThis(\PhpParser\Node\Expr\MethodCall $methodCall) : bool
|
||||
{
|
||||
$classMethod = $this->astResolver->resolveClassMethodFromMethodCall($methodCall);
|
||||
|
@ -237,6 +229,13 @@ final class FluentChainMethodCallNodeAnalyzer
|
|||
}
|
||||
return \false;
|
||||
}
|
||||
private function isCall(\PhpParser\Node\Expr $expr) : bool
|
||||
{
|
||||
if ($expr instanceof \PhpParser\Node\Expr\MethodCall) {
|
||||
return \true;
|
||||
}
|
||||
return $expr instanceof \PhpParser\Node\Expr\StaticCall;
|
||||
}
|
||||
private function isMethodCallCreatingNewInstance(\PhpParser\Node\Expr\MethodCall $methodCall) : bool
|
||||
{
|
||||
$classMethod = $this->astResolver->resolveClassMethodFromMethodCall($methodCall);
|
||||
|
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '41bf955f1778642ae6d756b383c611ba8c6c47d0';
|
||||
public const PACKAGE_VERSION = '15e12b69cddb7fb8be78a6f7ef611bd5e878db55';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2021-07-10 12:44:37';
|
||||
public const RELEASE_DATE = '2021-07-10 13:47:34';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20210710\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83::getLoader();
|
||||
return ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba::getLoader();
|
||||
|
|
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 ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83
|
||||
class ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba', '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\ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitaf285ca954deed69af59c68b4ed142ba::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,19 +42,19 @@ class ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInitaf285ca954deed69af59c68b4ed142ba::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequiref1e76c4919a104b34e4727e7610aaf83($fileIdentifier, $file);
|
||||
composerRequireaf285ca954deed69af59c68b4ed142ba($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequiref1e76c4919a104b34e4727e7610aaf83($fileIdentifier, $file)
|
||||
function composerRequireaf285ca954deed69af59c68b4ed142ba($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
require $file;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83
|
||||
class ComposerStaticInitaf285ca954deed69af59c68b4ed142ba
|
||||
{
|
||||
public static $files = array (
|
||||
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
|
||||
|
@ -3847,9 +3847,9 @@ class ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitf1e76c4919a104b34e4727e7610aaf83::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitaf285ca954deed69af59c68b4ed142ba::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitaf285ca954deed69af59c68b4ed142ba::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitaf285ca954deed69af59c68b4ed142ba::$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('RectorPrefix20210710\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83', false) && !interface_exists('ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83', false) && !trait_exists('ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83', false)) {
|
||||
spl_autoload_call('RectorPrefix20210710\ComposerAutoloaderInitf1e76c4919a104b34e4727e7610aaf83');
|
||||
if (!class_exists('ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba', false) && !interface_exists('ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba', false) && !trait_exists('ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba', false)) {
|
||||
spl_autoload_call('RectorPrefix20210710\ComposerAutoloaderInitaf285ca954deed69af59c68b4ed142ba');
|
||||
}
|
||||
if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) {
|
||||
spl_autoload_call('RectorPrefix20210710\Doctrine\Inflector\Inflector');
|
||||
|
@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20210710\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequiref1e76c4919a104b34e4727e7610aaf83')) {
|
||||
function composerRequiref1e76c4919a104b34e4727e7610aaf83() {
|
||||
return \RectorPrefix20210710\composerRequiref1e76c4919a104b34e4727e7610aaf83(...func_get_args());
|
||||
if (!function_exists('composerRequireaf285ca954deed69af59c68b4ed142ba')) {
|
||||
function composerRequireaf285ca954deed69af59c68b4ed142ba() {
|
||||
return \RectorPrefix20210710\composerRequireaf285ca954deed69af59c68b4ed142ba(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('parseArgs')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user