mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 03:40:50 +00:00
Updated Rector to commit cdf7bf581c6a417cfc8fc2b256597f30165d061f
cdf7bf581c
[BetterPhpDocParser] Merge PhpDocInfo::getParamTagValueByName() with getParamTagValueNodeByName() (#2703)
This commit is contained in:
parent
d21608a0d4
commit
66a5285042
|
@ -170,16 +170,6 @@ final class PhpDocInfo
|
|||
{
|
||||
return $this->phpDocNode->getParamTagValues();
|
||||
}
|
||||
public function getParamTagValueNodeByName(string $parameterName) : ?ParamTagValueNode
|
||||
{
|
||||
foreach ($this->phpDocNode->getParamTagValues() as $paramTagValueNode) {
|
||||
if ($paramTagValueNode->parameterName !== '$' . $parameterName) {
|
||||
continue;
|
||||
}
|
||||
return $paramTagValueNode;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public function getVarType(string $tagName = '@var') : Type
|
||||
{
|
||||
return $this->getTypeOrMixed($this->getVarTagValueNode($tagName));
|
||||
|
|
|
@ -22,7 +22,7 @@ final class PropertyDocBlockManipulator
|
|||
{
|
||||
$functionLike = $paramRename->getFunctionLike();
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($functionLike);
|
||||
$paramTagValueNode = $phpDocInfo->getParamTagValueNodeByName($paramRename->getCurrentName());
|
||||
$paramTagValueNode = $phpDocInfo->getParamTagValueByName($paramRename->getCurrentName());
|
||||
if (!$paramTagValueNode instanceof ParamTagValueNode) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@ final class PropertyPromotionRenamer
|
|||
}
|
||||
private function renameParamDoc(PhpDocInfo $phpDocInfo, Param $param, string $paramVarName, string $desiredPropertyName) : void
|
||||
{
|
||||
$paramTagValueNode = $phpDocInfo->getParamTagValueNodeByName($paramVarName);
|
||||
$paramTagValueNode = $phpDocInfo->getParamTagValueByName($paramVarName);
|
||||
if (!$paramTagValueNode instanceof ParamTagValueNode) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ CODE_SAMPLE
|
|||
/** @var string $oldName */
|
||||
$oldName = $this->getName($param->var);
|
||||
$this->variableRenamer->renameVariableInFunctionLike($constructClassMethod, $oldName, $propertyName, null);
|
||||
$paramTagValueNode = $classMethodPhpDocInfo->getParamTagValueNodeByName($paramName);
|
||||
$paramTagValueNode = $classMethodPhpDocInfo->getParamTagValueByName($paramName);
|
||||
if (!$paramTagValueNode instanceof ParamTagValueNode) {
|
||||
$this->decorateParamWithPropertyPhpDocInfo($constructClassMethod, $property, $param, $paramName);
|
||||
} elseif ($paramTagValueNode->parameterName !== '$' . $propertyName) {
|
||||
|
|
|
@ -17,12 +17,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c4d6f19b4d6386758b1f7aee3f1a9d4e41b59b42';
|
||||
public const PACKAGE_VERSION = 'cdf7bf581c6a417cfc8fc2b256597f30165d061f';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-07-22 16:33:50';
|
||||
public const RELEASE_DATE = '2022-07-23 10:56:14';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e::getLoader();
|
||||
return ComposerAutoloaderInitdbce111f6aec7e62ed274e8eefa44f5c::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 ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e
|
||||
class ComposerAutoloaderInitdbce111f6aec7e62ed274e8eefa44f5c
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInitdbce111f6aec7e62ed274e8eefa44f5c', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitdbce111f6aec7e62ed274e8eefa44f5c', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitac864a7b7060717eb8d64eef2434e97e::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitac864a7b7060717eb8d64eef2434e97e::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequireac864a7b7060717eb8d64eef2434e97e($fileIdentifier, $file);
|
||||
composerRequiredbce111f6aec7e62ed274e8eefa44f5c($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInitac864a7b7060717eb8d64eef2434e97e
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequireac864a7b7060717eb8d64eef2434e97e($fileIdentifier, $file)
|
||||
function composerRequiredbce111f6aec7e62ed274e8eefa44f5c($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 ComposerStaticInitac864a7b7060717eb8d64eef2434e97e
|
||||
class ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c
|
||||
{
|
||||
public static $files = array (
|
||||
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
||||
|
@ -3403,9 +3403,9 @@ class ComposerStaticInitac864a7b7060717eb8d64eef2434e97e
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitac864a7b7060717eb8d64eef2434e97e::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitac864a7b7060717eb8d64eef2434e97e::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitac864a7b7060717eb8d64eef2434e97e::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitdbce111f6aec7e62ed274e8eefa44f5c::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
30
vendor/composer/installed.json
vendored
30
vendor/composer/installed.json
vendored
|
@ -2280,12 +2280,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-phpoffice.git",
|
||||
"reference": "c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494"
|
||||
"reference": "ad7cfce089576330f59a5512768d7eb43a4bd55e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpoffice\/zipball\/c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494",
|
||||
"reference": "c7d2f5f6d6a8f96e3a8a690bcc3ed2496f27d494",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpoffice\/zipball\/ad7cfce089576330f59a5512768d7eb43a4bd55e",
|
||||
"reference": "ad7cfce089576330f59a5512768d7eb43a4bd55e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2296,20 +2296,20 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpstan\/extension-installer": "^1.1",
|
||||
"phpstan\/phpstan": "^1.8.1",
|
||||
"phpstan\/phpstan-strict-rules": "^1.1",
|
||||
"phpstan\/phpstan-webmozart-assert": "^1.0",
|
||||
"phpunit\/phpunit": "^9.5",
|
||||
"rector\/phpstan-rules": "^0.5.5",
|
||||
"phpstan\/phpstan": "^1.8.2",
|
||||
"phpstan\/phpstan-strict-rules": "^1.3",
|
||||
"phpstan\/phpstan-webmozart-assert": "^1.2",
|
||||
"phpunit\/phpunit": "^9.5.21",
|
||||
"rector\/phpstan-rules": "^0.5.8",
|
||||
"rector\/rector-src": "dev-main",
|
||||
"symplify\/easy-coding-standard": "^11.0",
|
||||
"symplify\/monorepo-builder": "^11.0",
|
||||
"symplify\/phpstan-extensions": "^11.0",
|
||||
"symplify\/phpstan-rules": "^11.0",
|
||||
"symplify\/rule-doc-generator": "^11.0",
|
||||
"symplify\/vendor-patches": "^11.0"
|
||||
"symplify\/easy-coding-standard": "^11.0.8",
|
||||
"symplify\/monorepo-builder": "^11.0.8",
|
||||
"symplify\/phpstan-extensions": "^11.0.8",
|
||||
"symplify\/phpstan-rules": "^11.0.8",
|
||||
"symplify\/rule-doc-generator": "^11.0.8",
|
||||
"symplify\/vendor-patches": "^11.0.8"
|
||||
},
|
||||
"time": "2022-07-19T09:38:45+00:00",
|
||||
"time": "2022-07-22T19:01:00+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ec96616'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9b1e906'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 7ee4e58'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main be4b95a'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 987bdb4'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e5b2693'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main c7d2f5f'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d876ff2'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5e47d42'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ec96616'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 9b1e906'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 7ee4e58'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main be4b95a'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 987bdb4'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e5b2693'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main ad7cfce'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d876ff2'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5e47d42'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
22
vendor/rector/rector-phpoffice/composer.json
vendored
22
vendor/rector/rector-phpoffice/composer.json
vendored
|
@ -8,18 +8,18 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpstan\/extension-installer": "^1.1",
|
||||
"rector\/phpstan-rules": "^0.5.5",
|
||||
"phpstan\/phpstan": "^1.8.1",
|
||||
"phpunit\/phpunit": "^9.5",
|
||||
"symplify\/phpstan-rules": "^11.0",
|
||||
"symplify\/phpstan-extensions": "^11.0",
|
||||
"symplify\/easy-coding-standard": "^11.0",
|
||||
"symplify\/rule-doc-generator": "^11.0",
|
||||
"phpunit\/phpunit": "^9.5.21",
|
||||
"rector\/phpstan-rules": "^0.5.8",
|
||||
"phpstan\/phpstan": "^1.8.2",
|
||||
"symplify\/phpstan-rules": "^11.0.8",
|
||||
"symplify\/phpstan-extensions": "^11.0.8",
|
||||
"symplify\/easy-coding-standard": "^11.0.8",
|
||||
"symplify\/rule-doc-generator": "^11.0.8",
|
||||
"rector\/rector-src": "dev-main",
|
||||
"phpstan\/phpstan-strict-rules": "^1.1",
|
||||
"phpstan\/phpstan-webmozart-assert": "^1.0",
|
||||
"symplify\/vendor-patches": "^11.0",
|
||||
"symplify\/monorepo-builder": "^11.0"
|
||||
"phpstan\/phpstan-strict-rules": "^1.3",
|
||||
"phpstan\/phpstan-webmozart-assert": "^1.2",
|
||||
"symplify\/vendor-patches": "^11.0.8",
|
||||
"symplify\/monorepo-builder": "^11.0.8"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
@ -27,20 +27,7 @@ use Rector\Renaming\ValueObject\RenameStaticMethod;
|
|||
# see https://github.com/PHPOffice/PhpSpreadsheet/blob/master/docs/topics/migration-from-PHPExcel.md
|
||||
# inspired https://github.com/PHPOffice/PhpSpreadsheet/blob/87f71e1930b497b36e3b9b1522117dfa87096d2b/src/PhpSpreadsheet/Helper/Migrator.php
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->rule(ChangeIOFactoryArgumentRector::class);
|
||||
$rectorConfig->rule(ChangeSearchLocationToRegisterReaderRector::class);
|
||||
$rectorConfig->rule(CellStaticToCoordinateRector::class);
|
||||
$rectorConfig->rule(ChangeDataTypeForValueRector::class);
|
||||
$rectorConfig->rule(ChangePdfWriterRector::class);
|
||||
$rectorConfig->rule(ChangeChartRendererRector::class);
|
||||
$rectorConfig->rule(AddRemovedDefaultValuesRector::class);
|
||||
$rectorConfig->rule(ChangeConditionalReturnedCellRector::class);
|
||||
$rectorConfig->rule(ChangeConditionalGetConditionRector::class);
|
||||
$rectorConfig->rule(ChangeConditionalSetConditionRector::class);
|
||||
$rectorConfig->rule(RemoveSetTempDirOnExcelWriterRector::class);
|
||||
$rectorConfig->rule(ChangeDuplicateStyleArrayToApplyFromArrayRector::class);
|
||||
$rectorConfig->rule(GetDefaultStyleToGetParentRector::class);
|
||||
$rectorConfig->rule(IncreaseColumnIndexRector::class);
|
||||
$rectorConfig->rules([ChangeIOFactoryArgumentRector::class, ChangeSearchLocationToRegisterReaderRector::class, CellStaticToCoordinateRector::class, ChangeDataTypeForValueRector::class, ChangePdfWriterRector::class, ChangeChartRendererRector::class, AddRemovedDefaultValuesRector::class, ChangeConditionalReturnedCellRector::class, ChangeConditionalGetConditionRector::class, ChangeConditionalSetConditionRector::class, RemoveSetTempDirOnExcelWriterRector::class, ChangeDuplicateStyleArrayToApplyFromArrayRector::class, GetDefaultStyleToGetParentRector::class, IncreaseColumnIndexRector::class]);
|
||||
# beware! this can be run only once, since its circular change
|
||||
$rectorConfig->ruleWithConfiguration(RenameMethodRector::class, [
|
||||
// https://github.com/PHPOffice/PhpSpreadsheet/blob/master/docs/topics/migration-from-PHPExcel.md#worksheetsetsharedstyle
|
||||
|
|
|
@ -4,6 +4,9 @@ declare (strict_types=1);
|
|||
namespace Rector\PHPOffice\Set;
|
||||
|
||||
use Rector\Set\Contract\SetListInterface;
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
final class PHPOfficeSetList implements SetListInterface
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user