mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 643c444d936e692a8a0224b7e7c81a74be40d398
643c444d93
[automated] Re-Generate Nodes/Rectors Documentation (#2956)
This commit is contained in:
parent
debee1711f
commit
0c28bef447
@ -1,4 +1,4 @@
|
||||
# 395 Rules Overview
|
||||
# 398 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
- [Arguments](#arguments) (5)
|
||||
|
||||
- [CodeQuality](#codequality) (72)
|
||||
- [CodeQuality](#codequality) (75)
|
||||
|
||||
- [CodingStyle](#codingstyle) (36)
|
||||
|
||||
@ -385,6 +385,25 @@ Negated identical boolean compare to not identical compare (does not apply to no
|
||||
|
||||
<br>
|
||||
|
||||
### BoolvalToTypeCastRector
|
||||
|
||||
Change `boolval()` to faster and readable (bool) `$value`
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\FuncCall\BoolvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/BoolvalToTypeCastRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run($value)
|
||||
{
|
||||
- return boolval($value);
|
||||
+ return (bool) $value;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### CallUserFuncWithArrowFunctionToInlineRector
|
||||
|
||||
Refactor `call_user_func()` with arrow function to direct call
|
||||
@ -674,6 +693,27 @@ Flip type control to use exclusive type
|
||||
|
||||
<br>
|
||||
|
||||
### FloatvalToTypeCastRector
|
||||
|
||||
Change `floatval()` and `doubleval()` to faster and readable (float) `$value`
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\FuncCall\FloatvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/FloatvalToTypeCastRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run($value)
|
||||
{
|
||||
- $a = floatval($value);
|
||||
- $b = doubleval($value);
|
||||
+ $a = (float) $value;
|
||||
+ $b = (float) $value;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ForRepeatedCountToOwnVariableRector
|
||||
|
||||
Change `count()` in for function to own variable
|
||||
@ -1539,6 +1579,25 @@ Changes strlen comparison to 0 to direct empty string compare
|
||||
|
||||
<br>
|
||||
|
||||
### StrvalToTypeCastRector
|
||||
|
||||
Change `strval()` to faster and readable (string) `$value`
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\FuncCall\StrvalToTypeCastRector`](../rules/CodeQuality/Rector/FuncCall/StrvalToTypeCastRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run($value)
|
||||
{
|
||||
- return strval($value);
|
||||
+ return (string) $value;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### SwitchNegatedTernaryRector
|
||||
|
||||
Switch negated ternary condition rector
|
||||
|
@ -17,12 +17,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '6b3ce0af37a7fbae87d06e43bc485616bf81be3e';
|
||||
public const PACKAGE_VERSION = '643c444d936e692a8a0224b7e7c81a74be40d398';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-09-24 22:10:53';
|
||||
public const RELEASE_DATE = '2022-09-25 00:32:52';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68::getLoader();
|
||||
return ComposerAutoloaderInit6f996a84018146e04a5217d95e34e960::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 ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68
|
||||
class ComposerAutoloaderInit6f996a84018146e04a5217d95e34e960
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6f996a84018146e04a5217d95e34e960', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6f996a84018146e04a5217d95e34e960', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6f996a84018146e04a5217d95e34e960::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInit6f996a84018146e04a5217d95e34e960::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequireea4ec46d1ab136189f61540ac43e5d68($fileIdentifier, $file);
|
||||
composerRequire6f996a84018146e04a5217d95e34e960($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInitea4ec46d1ab136189f61540ac43e5d68
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequireea4ec46d1ab136189f61540ac43e5d68($fileIdentifier, $file)
|
||||
function composerRequire6f996a84018146e04a5217d95e34e960($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 ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68
|
||||
class ComposerStaticInit6f996a84018146e04a5217d95e34e960
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3107,9 +3107,9 @@ class ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitea4ec46d1ab136189f61540ac43e5d68::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6f996a84018146e04a5217d95e34e960::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6f996a84018146e04a5217d95e34e960::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6f996a84018146e04a5217d95e34e960::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user