Updated Rector to commit d9ee43c28dd0718bd2a2528a4313be2c6199666d

d9ee43c28d [CodeQuality] Handle mix HTML+PHP on ForRepeatedCountToOwnVariableRector (#3282)
This commit is contained in:
Tomas Votruba 2023-01-14 08:08:29 +00:00
parent a43370e1f4
commit 788f8c3fea
5 changed files with 21 additions and 12 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0.15.7';
public const PACKAGE_VERSION = 'd9ee43c28dd0718bd2a2528a4313be2c6199666d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-01-13 19:58:05';
public const RELEASE_DATE = '2023-01-14 09:04:12';
/**
* @var int
*/

View File

@ -8,6 +8,7 @@ use PhpParser\Node\Arg;
use PhpParser\Node\Expr;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\InlineHTML;
use PhpParser\Node\Stmt\Nop;
use PhpParser\NodeTraverser;
use PhpParser\NodeVisitor\NodeConnectingVisitor;
@ -385,6 +386,10 @@ CODE_SAMPLE;
if (!$firstNodePreviousNode instanceof Node && $node->hasAttribute(AttributeKey::PREVIOUS_NODE)) {
/** @var Node $previousNode */
$previousNode = $node->getAttribute(AttributeKey::PREVIOUS_NODE);
if ($previousNode instanceof InlineHTML && !$firstNode instanceof InlineHTML) {
// re-print InlineHTML is safe
$previousNode->setAttribute(AttributeKey::ORIGINAL_NODE, null);
}
$nodes = \array_merge([$previousNode], \is_array($nodes) ? $nodes : \iterator_to_array($nodes));
}
$lastNode = \end($nodes);
@ -392,6 +397,10 @@ CODE_SAMPLE;
if (!$lastNodeNextNode instanceof Node && $node->hasAttribute(AttributeKey::NEXT_NODE)) {
/** @var Node $nextNode */
$nextNode = $node->getAttribute(AttributeKey::NEXT_NODE);
if ($nextNode instanceof InlineHTML && !$lastNode instanceof InlineHTML) {
// re-print InlineHTML is safe
$nextNode->setAttribute(AttributeKey::ORIGINAL_NODE, null);
}
$nodes = \array_merge(\is_array($nodes) ? $nodes : \iterator_to_array($nodes), [$nextNode]);
}
$nodeTraverser = new NodeTraverser();

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitfc2b70a0d114b41053d1e325d843bf92::getLoader();
return ComposerAutoloaderInitad731966b74d2ee6a4c2a38476268881::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitfc2b70a0d114b41053d1e325d843bf92
class ComposerAutoloaderInitad731966b74d2ee6a4c2a38476268881
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitfc2b70a0d114b41053d1e325d843bf92
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitfc2b70a0d114b41053d1e325d843bf92', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitad731966b74d2ee6a4c2a38476268881', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitfc2b70a0d114b41053d1e325d843bf92', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitad731966b74d2ee6a4c2a38476268881', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitad731966b74d2ee6a4c2a38476268881::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitad731966b74d2ee6a4c2a38476268881::$files;
$requireFile = static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92
class ComposerStaticInitad731966b74d2ee6a4c2a38476268881
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3065,9 +3065,9 @@ class ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitfc2b70a0d114b41053d1e325d843bf92::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitad731966b74d2ee6a4c2a38476268881::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitad731966b74d2ee6a4c2a38476268881::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitad731966b74d2ee6a4c2a38476268881::$classMap;
}, null, ClassLoader::class);
}