mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 9cb97aa042de32f336321516131f007dd519c2d4
9cb97aa042
[Php82] Skip non-FilesystemIterator on FilesystemIteratorSkipDotsRector (#3298)
This commit is contained in:
parent
49dcc089a5
commit
df111d9b04
@ -11,6 +11,7 @@ use PhpParser\Node\Expr\BinaryOp\BitwiseOr;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
use PhpParser\Node\Expr\New_;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\ValueObject\PhpVersionFeature;
|
||||
use Rector\NodeNameResolver\NodeNameResolver\ClassConstFetchNameResolver;
|
||||
@ -46,6 +47,9 @@ final class FilesystemIteratorSkipDotsRector extends AbstractRector implements M
|
||||
*/
|
||||
public function refactor(Node $node) : ?New_
|
||||
{
|
||||
if (!$this->isObjectType($node->class, new ObjectType('FilesystemIterator'))) {
|
||||
return null;
|
||||
}
|
||||
if ($node->isFirstClassCallable()) {
|
||||
return null;
|
||||
}
|
||||
@ -83,7 +87,8 @@ final class FilesystemIteratorSkipDotsRector extends AbstractRector implements M
|
||||
private function isSkipDots(Expr $expr) : bool
|
||||
{
|
||||
if (!$expr instanceof ClassConstFetch) {
|
||||
return \false;
|
||||
// can be anything
|
||||
return \true;
|
||||
}
|
||||
return $this->classConstFetchNameResolver->resolve($expr) === 'FilesystemIterator::SKIP_DOTS';
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '0.15.8';
|
||||
public const PACKAGE_VERSION = '9cb97aa042de32f336321516131f007dd519c2d4';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-01-20 20:21:18';
|
||||
public const RELEASE_DATE = '2023-01-21 13:04:15';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit37f8995ef812480f1500af09738cbdc0::getLoader();
|
||||
return ComposerAutoloaderInit6ebd1588072a038294cd05cb51f261c5::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit37f8995ef812480f1500af09738cbdc0
|
||||
class ComposerAutoloaderInit6ebd1588072a038294cd05cb51f261c5
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit37f8995ef812480f1500af09738cbdc0
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit37f8995ef812480f1500af09738cbdc0', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6ebd1588072a038294cd05cb51f261c5', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit37f8995ef812480f1500af09738cbdc0', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6ebd1588072a038294cd05cb51f261c5', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit37f8995ef812480f1500af09738cbdc0::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6ebd1588072a038294cd05cb51f261c5::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit37f8995ef812480f1500af09738cbdc0::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit6ebd1588072a038294cd05cb51f261c5::$files;
|
||||
$requireFile = static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit37f8995ef812480f1500af09738cbdc0
|
||||
class ComposerStaticInit6ebd1588072a038294cd05cb51f261c5
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3070,9 +3070,9 @@ class ComposerStaticInit37f8995ef812480f1500af09738cbdc0
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit37f8995ef812480f1500af09738cbdc0::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit37f8995ef812480f1500af09738cbdc0::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit37f8995ef812480f1500af09738cbdc0::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6ebd1588072a038294cd05cb51f261c5::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6ebd1588072a038294cd05cb51f261c5::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6ebd1588072a038294cd05cb51f261c5::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user