Updated Rector to commit b5c8f9a8930520277828986608fda0b75ef5381a

b5c8f9a893 use strlen() directly, as enough for string check (#4969)
This commit is contained in:
Tomas Votruba 2023-09-10 14:40:14 +00:00
parent e356a37b38
commit 44ac4c0b00
8 changed files with 16 additions and 19 deletions

View File

@ -3,7 +3,6 @@
declare (strict_types=1);
namespace Rector\NodeNameResolver\Regex;
use RectorPrefix202309\Nette\Utils\Strings;
final class RegexPatternDetector
{
/**
@ -14,7 +13,7 @@ final class RegexPatternDetector
private const POSSIBLE_DELIMITERS = ['#', '~', '/'];
public function isRegexPattern(string $name) : bool
{
if (Strings::length($name) <= 2) {
if (\strlen($name) <= 2) {
return \false;
}
$firstChar = $name[0];

View File

@ -3,7 +3,6 @@
declare (strict_types=1);
namespace Rector\CodeQuality\Rector\If_;
use RectorPrefix202309\Nette\Utils\Strings;
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Assign;
@ -163,6 +162,6 @@ CODE_SAMPLE
private function isNodeTooLong(Assign $assign) : bool
{
$assignContent = $this->betterStandardPrinter->print($assign);
return Strings::length($assignContent) > self::LINE_LENGTH_LIMIT;
return \strlen($assignContent) > self::LINE_LENGTH_LIMIT;
}
}

View File

@ -73,7 +73,7 @@ final class UseImportNameMatcher
if (!$originalUseUseNode->alias instanceof Identifier) {
return $prefix . $originalUseUseNode->name->toString();
}
$unaliasedShortClass = Strings::substring($tag, Strings::length($originalUseUseNode->alias->toString()));
$unaliasedShortClass = Strings::substring($tag, \strlen($originalUseUseNode->alias->toString()));
if (\strncmp($unaliasedShortClass, '\\', \strlen('\\')) === 0) {
return $prefix . $originalUseUseNode->name . $unaliasedShortClass;
}

View File

@ -3,7 +3,6 @@
declare (strict_types=1);
namespace Rector\Php74\Rector\LNumber;
use RectorPrefix202309\Nette\Utils\Strings;
use PhpParser\Node;
use PhpParser\Node\Scalar\DNumber;
use PhpParser\Node\Scalar\LNumber;
@ -142,7 +141,7 @@ CODE_SAMPLE
return \true;
}
// too short
return Strings::length($rawValue) <= self::GROUP_SIZE;
return \strlen($rawValue) <= self::GROUP_SIZE;
}
/**
* @return string[]

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'ead7a25b38797531d9e6a755492200d59b05b1ae';
public const PACKAGE_VERSION = 'b5c8f9a8930520277828986608fda0b75ef5381a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-09-10 20:38:12';
public const RELEASE_DATE = '2023-09-10 16:37:09';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderIniteb745fc3e35d7f92a22f4dc59192bd7b
class ComposerAutoloaderInit8b3ff79e67bfd1ab93394997dc67f08d
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderIniteb745fc3e35d7f92a22f4dc59192bd7b
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderIniteb745fc3e35d7f92a22f4dc59192bd7b', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit8b3ff79e67bfd1ab93394997dc67f08d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderIniteb745fc3e35d7f92a22f4dc59192bd7b', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit8b3ff79e67bfd1ab93394997dc67f08d', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d::$files;
$requireFile = \Closure::bind(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 ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b
class ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -2599,9 +2599,9 @@ class ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b::$prefixDirsPsr4;
$loader->classMap = ComposerStaticIniteb745fc3e35d7f92a22f4dc59192bd7b::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit8b3ff79e67bfd1ab93394997dc67f08d::$classMap;
}, null, ClassLoader::class);
}