Updated Rector to commit 7607da6751

7607da6751 bump docs
This commit is contained in:
Tomas Votruba 2021-10-02 14:09:09 +00:00
parent e8f35ec2b6
commit 028a05a8ab
6 changed files with 67 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# 476 Rules Overview
# 477 Rules Overview
<br>
@ -40,6 +40,8 @@
- [EarlyReturn](#earlyreturn) (11)
- [Generics](#generics) (1)
- [LeagueEvent](#leagueevent) (1)
- [MockeryToProphecy](#mockerytoprophecy) (2)
@ -5848,6 +5850,51 @@ Changes Single return of || to early returns
<br>
## Generics
### GenericClassMethodParamRector
Make class methods generic based on implemented interface
:wrench: **configure it!**
- class: [`Rector\Generics\Rector\ClassMethod\GenericClassMethodParamRector`](../rules/Generics/Rector/ClassMethod/GenericClassMethodParamRector.php)
```php
use Rector\Generics\Rector\ClassMethod\GenericClassMethodParamRector;
use Rector\Generics\ValueObject\GenericClassMethodParam;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\SymfonyPhpConfig\ValueObjectInliner;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(GenericClassMethodParamRector::class)
->call('configure', [[
GenericClassMethodParamRector::GENERIC_CLASS_METHOD_PARAMS => ValueObjectInliner::inline([
new GenericClassMethodParam('SomeInterface', 'getParams', 0, 'ParamInterface'),
]),
]]);
};
```
```diff
final class SomeClass implements SomeInterface
{
- private method getParams(SomeSpecificType $someParam)
+ /**
+ * @param SomeSpecificType $someParam
+ */
+ public method getParams(ParamInterface $someParam)
{
}
}
```
<br>
## LeagueEvent
### DispatchStringToObjectRector

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'e6894a9d1b96dc52d2e2b6e7ab3972204320d3a4';
public const PACKAGE_VERSION = '7607da675158a780100fb3aca2831f3374bead75';
/**
* @var string
*/
public const RELEASE_DATE = '2021-10-02 13:53:47';
public const RELEASE_DATE = '2021-10-02 15:54:45';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211002\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitcea735196a58412c721700164887f2c9::getLoader();
return ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitcea735196a58412c721700164887f2c9
class ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitcea735196a58412c721700164887f2c9
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitcea735196a58412c721700164887f2c9', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitcea735196a58412c721700164887f2c9', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitcea735196a58412c721700164887f2c9::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit7c3760abe4ba3c85576b29c944592796::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitcea735196a58412c721700164887f2c9
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitcea735196a58412c721700164887f2c9::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit7c3760abe4ba3c85576b29c944592796::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirecea735196a58412c721700164887f2c9($fileIdentifier, $file);
composerRequire7c3760abe4ba3c85576b29c944592796($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequirecea735196a58412c721700164887f2c9($fileIdentifier, $file)
function composerRequire7c3760abe4ba3c85576b29c944592796($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitcea735196a58412c721700164887f2c9
class ComposerStaticInit7c3760abe4ba3c85576b29c944592796
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
@ -3886,9 +3886,9 @@ class ComposerStaticInitcea735196a58412c721700164887f2c9
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitcea735196a58412c721700164887f2c9::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcea735196a58412c721700164887f2c9::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcea735196a58412c721700164887f2c9::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit7c3760abe4ba3c85576b29c944592796::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7c3760abe4ba3c85576b29c944592796::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7c3760abe4ba3c85576b29c944592796::$classMap;
}, null, ClassLoader::class);
}

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20211002\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitcea735196a58412c721700164887f2c9', false) && !interface_exists('ComposerAutoloaderInitcea735196a58412c721700164887f2c9', false) && !trait_exists('ComposerAutoloaderInitcea735196a58412c721700164887f2c9', false)) {
spl_autoload_call('RectorPrefix20211002\ComposerAutoloaderInitcea735196a58412c721700164887f2c9');
if (!class_exists('ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796', false) && !interface_exists('ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796', false) && !trait_exists('ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796', false)) {
spl_autoload_call('RectorPrefix20211002\ComposerAutoloaderInit7c3760abe4ba3c85576b29c944592796');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20211002\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211002\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirecea735196a58412c721700164887f2c9')) {
function composerRequirecea735196a58412c721700164887f2c9() {
return \RectorPrefix20211002\composerRequirecea735196a58412c721700164887f2c9(...func_get_args());
if (!function_exists('composerRequire7c3760abe4ba3c85576b29c944592796')) {
function composerRequire7c3760abe4ba3c85576b29c944592796() {
return \RectorPrefix20211002\composerRequire7c3760abe4ba3c85576b29c944592796(...func_get_args());
}
}
if (!function_exists('parseArgs')) {