mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 17894d729f7711e9540340f3e6c6847fa40a9679
17894d729f
restore
This commit is contained in:
parent
571bddfb01
commit
6ccf847c93
@ -1,4 +1,4 @@
|
||||
# 381 Rules Overview
|
||||
# 379 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
- [Carbon](#carbon) (4)
|
||||
|
||||
- [CodeQuality](#codequality) (75)
|
||||
- [CodeQuality](#codequality) (73)
|
||||
|
||||
- [CodingStyle](#codingstyle) (28)
|
||||
|
||||
@ -364,35 +364,6 @@ Refactor `call_user_func()` with arrow function to direct call
|
||||
|
||||
<br>
|
||||
|
||||
### CallableThisArrayToAnonymousFunctionRector
|
||||
|
||||
Convert [$this, "method"] to proper anonymous function
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector`](../rules/CodeQuality/Rector/Array_/CallableThisArrayToAnonymousFunctionRector.php)
|
||||
|
||||
```diff
|
||||
class SomeClass
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$values = [1, 5, 3];
|
||||
- usort($values, [$this, 'compareSize']);
|
||||
+ usort($values, function ($first, $second) {
|
||||
+ return $this->compareSize($first, $second);
|
||||
+ });
|
||||
|
||||
return $values;
|
||||
}
|
||||
|
||||
private function compareSize($first, $second)
|
||||
{
|
||||
return $first <=> $second;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### ChangeArrayPushToArrayAssignRector
|
||||
|
||||
Change `array_push()` to direct variable assign
|
||||
@ -752,19 +723,6 @@ Simplify `foreach` loops into `in_array` when possible
|
||||
|
||||
<br>
|
||||
|
||||
### GetClassToInstanceOfRector
|
||||
|
||||
Changes comparison with get_class to instanceof
|
||||
|
||||
- class: [`Rector\CodeQuality\Rector\Identical\GetClassToInstanceOfRector`](../rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php)
|
||||
|
||||
```diff
|
||||
-if (EventsListener::class === get_class($event->job)) { }
|
||||
+if ($event->job instanceof EventsListener) { }
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### InlineArrayReturnAssignRector
|
||||
|
||||
Inline just in time array dim fetch assigns to direct return
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '26720daf6497fe2d563d88d670ee5a6af944250c';
|
||||
public const PACKAGE_VERSION = '17894d729f7711e9540340f3e6c6847fa40a9679';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-06-24 21:56:06';
|
||||
public const RELEASE_DATE = '2024-06-24 21:58:52';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1::getLoader();
|
||||
return ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a::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 ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1
|
||||
class ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitdf983715ccb121e1420731907695d1b1::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitdf983715ccb121e1420731907695d1b1::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a::$files;
|
||||
$requireFile = \Closure::bind(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 ComposerStaticInitdf983715ccb121e1420731907695d1b1
|
||||
class ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -2748,9 +2748,9 @@ class ComposerStaticInitdf983715ccb121e1420731907695d1b1
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitdf983715ccb121e1420731907695d1b1::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitdf983715ccb121e1420731907695d1b1::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitdf983715ccb121e1420731907695d1b1::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd98d3a989b9f99591f8f5a74c164268a::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
2
vendor/scoper-autoload.php
vendored
2
vendor/scoper-autoload.php
vendored
@ -30,7 +30,7 @@ if (!function_exists('humbug_phpscoper_expose_class')) {
|
||||
}
|
||||
}
|
||||
humbug_phpscoper_expose_class('AutoloadIncluder', 'RectorPrefix202406\AutoloadIncluder');
|
||||
humbug_phpscoper_expose_class('ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1', 'RectorPrefix202406\ComposerAutoloaderInitdf983715ccb121e1420731907695d1b1');
|
||||
humbug_phpscoper_expose_class('ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a', 'RectorPrefix202406\ComposerAutoloaderInitd98d3a989b9f99591f8f5a74c164268a');
|
||||
humbug_phpscoper_expose_class('Product', 'RectorPrefix202406\Product');
|
||||
|
||||
// Function aliases. For more information see:
|
||||
|
Loading…
x
Reference in New Issue
Block a user