diff --git a/rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php b/rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php index 572a0f81e90..13d496b8d73 100644 --- a/rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php +++ b/rules/CodeQuality/Rector/Class_/InlineConstructorDefaultToPropertyRector.php @@ -7,6 +7,7 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Property; +use PhpParser\Node\Stmt\PropertyProperty; use Rector\CodeQuality\NodeAnalyzer\ConstructorPropertyDefaultExprResolver; use Rector\Core\Rector\AbstractRector; use Rector\Core\ValueObject\MethodName; @@ -69,22 +70,34 @@ CODE_SAMPLE return null; } $hasChanged = \false; + $propertyProperties = $this->getNonReadonlyPropertyProperty($node); foreach ($defaultPropertyExprAssigns as $defaultPropertyExprAssign) { - $property = $node->getProperty($defaultPropertyExprAssign->getPropertyName()); - if (!$property instanceof Property) { - continue; + foreach ($propertyProperties as $propertyProperty) { + if (!$this->isName($propertyProperty, $defaultPropertyExprAssign->getPropertyName())) { + continue; + } + $propertyProperty->default = $defaultPropertyExprAssign->getDefaultExpr(); + $hasChanged = \true; + $this->removeNode($defaultPropertyExprAssign->getAssignExpression()); } - if ($property->isReadonly()) { - continue; - } - $propertyProperty = $property->props[0]; - $propertyProperty->default = $defaultPropertyExprAssign->getDefaultExpr(); - $hasChanged = \true; - $this->removeNode($defaultPropertyExprAssign->getAssignExpression()); } if (!$hasChanged) { return null; } return $node; } + /** + * @return PropertyProperty[] + */ + private function getNonReadonlyPropertyProperty(Class_ $class) : array + { + $propertyProperties = []; + foreach ($class->getProperties() as $property) { + if ($property->isReadonly()) { + continue; + } + $propertyProperties = \array_merge($propertyProperties, $property->props); + } + return $propertyProperties; + } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index ec97fe426c4..9530e493e0e 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -17,12 +17,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '2427c5a094a39018e0c558482faf218d577e3382'; + public const PACKAGE_VERSION = 'ee04ee1dc59ff0a6c3ff5d6558612dce7757a8f2'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-10-14 11:43:45'; + public const RELEASE_DATE = '2022-10-14 16:46:51'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 1ddabba5dd4..a9a7af59368 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -3,10 +3,23 @@ // autoload.php @generated by Composer if (PHP_VERSION_ID < 50600) { - echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; - exit(1); + if (!headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; + if (!ini_get('display_errors')) { + if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { + fwrite(STDERR, $err); + } elseif (!headers_sent()) { + echo $err; + } + } + trigger_error( + $err, + E_USER_ERROR + ); } require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc::getLoader(); +return ComposerAutoloaderInit5c1fdb34e3926a7a0bf66efb0dc94722::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 8cafb4d68fe..da6c5927eec 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc +class ComposerAutoloaderInit5c1fdb34e3926a7a0bf66efb0dc94722 { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit5c1fdb34e3926a7a0bf66efb0dc94722', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit5c1fdb34e3926a7a0bf66efb0dc94722', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire7801c2cd5fb87fbd8521631b02cf69bc($fileIdentifier, $file); + composerRequire5c1fdb34e3926a7a0bf66efb0dc94722($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInit7801c2cd5fb87fbd8521631b02cf69bc * @param string $file * @return void */ -function composerRequire7801c2cd5fb87fbd8521631b02cf69bc($fileIdentifier, $file) +function composerRequire5c1fdb34e3926a7a0bf66efb0dc94722($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 601885dfa3d..860d6914627 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc +class ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3091,9 +3091,9 @@ class ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit7801c2cd5fb87fbd8521631b02cf69bc::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit5c1fdb34e3926a7a0bf66efb0dc94722::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 14f9147bb0a..41866f6b582 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -685,17 +685,17 @@ }, { "name": "phpstan\/phpdoc-parser", - "version": "1.10.0", - "version_normalized": "1.10.0.0", + "version": "1.11.0", + "version_normalized": "1.11.0.0", "source": { "type": "git", "url": "https:\/\/github.com\/phpstan\/phpdoc-parser.git", - "reference": "87fa2d526e56737a2ae8fa201a61b15efae59b8a" + "reference": "7d1e81213b0c7eb8d5a9f524456cbc2778ed5c65" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/87fa2d526e56737a2ae8fa201a61b15efae59b8a", - "reference": "87fa2d526e56737a2ae8fa201a61b15efae59b8a", + "url": "https:\/\/api.github.com\/repos\/phpstan\/phpdoc-parser\/zipball\/7d1e81213b0c7eb8d5a9f524456cbc2778ed5c65", + "reference": "7d1e81213b0c7eb8d5a9f524456cbc2778ed5c65", "shasum": "" }, "require": { @@ -710,7 +710,7 @@ "phpunit\/phpunit": "^9.5", "symfony\/process": "^5.2" }, - "time": "2022-10-12T19:19:18+00:00", + "time": "2022-10-14T13:32:28+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -727,7 +727,7 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https:\/\/github.com\/phpstan\/phpdoc-parser\/issues", - "source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.10.0" + "source": "https:\/\/github.com\/phpstan\/phpdoc-parser\/tree\/1.11.0" }, "install-path": "..\/phpstan\/phpdoc-parser" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 3419decee44..75123384b04 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202210; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.14.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.5', 'version' => '2.0.5.0', 'reference' => 'ade2b3bbfb776f27f0558e26eed43b5d9fe1b392', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.8', 'version' => '3.2.8.0', 'reference' => '02a54c4c872b99e4ec05c4aec54b5a06eb0f6368', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.1', 'version' => '4.15.1.0', 'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.10.0', 'version' => '1.10.0.0', 'reference' => '87fa2d526e56737a2ae8fa201a61b15efae59b8a', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.9', 'version' => '1.8.9.0', 'reference' => '3a72d9d9f2528fbd50c2d8fcf155fd9f74ade3f2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'reference' => '4a3c437c09075736285d1cabb5c75bf27ed0bc84', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'react/cache' => array('pretty_version' => 'v1.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.14.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c56069f7665bfd544506aadf77b67464ce043f5c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'd75c674779ffbbb96e2b02074b1e2877dc37781d', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '2decdcfeef9d117e4589ebc9e7fdbab11c030813', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-php-parser' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9c21f5f57464fc5af8765a1007eced8f7f62677c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '294de0ce80a9eb2c1b2d0d8e2762032dba0044e0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5568edaff83ae5ece8eec7bc8e6bfa61e1074d8f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.14.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'ff28f335bdd06251c7da89e4575fe37e241299df', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7fa3b9cf17363468795e539231a5c91b02b608fc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => 'b9c797c9d56afc290d4265854bafd01b4e379240', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => '4d216a2beef096edf040a070117c39ca2abce307', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7e7e0ff180d4c5a6636eaad57b65092014b61864', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => 'a5eda74d545a70949c948f5c83c90c01e69c22bf', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => '30393c5bc00dcd8d750e1c547d0c07398da93220', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => '0b5777ebc9b88639bdb551319860f0a8acf05bd1', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); +return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.14.x-dev'), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '708411c7e45ac85371a99d50f52284971494bede', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'e300eb6c535192decd27a85bc72a9290f0d6b3bd', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => 'ced299686f41dce890debac69273b47ffe98a40c', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.5', 'version' => '2.0.5.0', 'reference' => 'ade2b3bbfb776f27f0558e26eed43b5d9fe1b392', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.1', 'version' => '3.0.1.0', 'reference' => '531bfb9d15f8aa57454f5f0285b18bec903b8fb7', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v3.2.8', 'version' => '3.2.8.0', 'reference' => '02a54c4c872b99e4ec05c4aec54b5a06eb0f6368', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.15.1', 'version' => '4.15.1.0', 'reference' => '0ef6c55a3f47f89d7a374e6f835197a0b5fcf900', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.1.0', 'version' => '4.1.0.0', 'reference' => '8a4b664e916df82ff26a44709942dfd593fa6f30', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '7d1e81213b0c7eb8d5a9f524456cbc2778ed5c65', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('pretty_version' => '1.8.9', 'version' => '1.8.9.0', 'reference' => '3a72d9d9f2528fbd50c2d8fcf155fd9f74ade3f2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpstan', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan-phpunit' => array('pretty_version' => '1.1.1', 'version' => '1.1.1.0', 'reference' => '4a3c437c09075736285d1cabb5c75bf27ed0bc84', 'type' => 'phpstan-extension', 'install_path' => __DIR__ . '/../phpstan/phpstan-phpunit', 'aliases' => array(), 'dev_requirement' => \false), 'psr/cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'aa5030cfa5405eccfdcb1083ce040c2cb8d253bf', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/cache', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/event-dispatcher' => array('pretty_version' => '1.0.0', 'version' => '1.0.0.0', 'reference' => 'dbefd12671e8a14ec7f180cab83036ed26714bb0', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/event-dispatcher', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'react/cache' => array('pretty_version' => 'v1.1.1', 'version' => '1.1.1.0', 'reference' => '4bf736a2cccec7298bdf745db77585966fc2ca7e', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.10.0', 'version' => '1.10.0.0', 'reference' => 'a5427e7dfa47713e438016905605819d101f238c', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '187fb56f46d424afb6ec4ad089269c72eec2e137', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v2.9.0', 'version' => '2.9.0.0', 'reference' => '234f8fd1023c9158e2314fa9d7d0e6a83db42910', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise-timer' => array('pretty_version' => 'v1.9.0', 'version' => '1.9.0.0', 'reference' => 'aa7a73c74b8d8c0f622f5982ff7b0351bc29e495', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise-timer', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.12.0', 'version' => '1.12.0.0', 'reference' => '81e1b4d7f5450ebd8d2e9a95bb008bb15ca95a7b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => '7a423506ee1903e89f1e08ec5f0ed430ff784ae9', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => '0.14.x-dev', 1 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c56069f7665bfd544506aadf77b67464ce043f5c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'd75c674779ffbbb96e2b02074b1e2877dc37781d', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-laravel' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '2decdcfeef9d117e4589ebc9e7fdbab11c030813', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-laravel', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-php-parser' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '9c21f5f57464fc5af8765a1007eced8f7f62677c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-php-parser', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpoffice' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '294de0ce80a9eb2c1b2d0d8e2762032dba0044e0', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpoffice', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '5568edaff83ae5ece8eec7bc8e6bfa61e1074d8f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => NULL, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(0 => '0.14.x-dev'), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'ff28f335bdd06251c7da89e4575fe37e241299df', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/cache-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/config' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => 'a0645dc585d378b73c01115dd7ab9348f7d40c85', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/config', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7fa3b9cf17363468795e539231a5c91b02b608fc', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/contracts' => array('pretty_version' => 'v3.1.1', 'version' => '3.1.1.0', 'reference' => '8656c9e7f44435eaf428f2aa7f083c65297fb22f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/dependency-injection' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => 'b9c797c9d56afc290d4265854bafd01b4e379240', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/dependency-injection', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/event-dispatcher-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/filesystem' => array('pretty_version' => 'v6.1.5', 'version' => '6.1.5.0', 'reference' => '4d216a2beef096edf040a070117c39ca2abce307', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.1.3', 'version' => '6.1.3.0', 'reference' => '39696bff2c2970b3779a5cac7bf9f0b88fc2b709', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/http-client-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-normalizer' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '219aa369ceff116e673852dce47c3a41794c14bd', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.26.0', 'version' => '1.26.0.0', 'reference' => '9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symfony/service-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0|3.0')), 'symfony/string' => array('pretty_version' => 'v6.1.6', 'version' => '6.1.6.0', 'reference' => '7e7e0ff180d4c5a6636eaad57b65092014b61864', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/string', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/translation-contracts' => array('dev_requirement' => \false, 'replaced' => array(0 => 'v3.1.1')), 'symplify/autowire-array-parameter' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => 'a5eda74d545a70949c948f5c83c90c01e69c22bf', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/autowire-array-parameter', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => '30393c5bc00dcd8d750e1c547d0c07398da93220', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.1.10', 'version' => '11.1.10.0', 'reference' => '0b5777ebc9b88639bdb551319860f0a8acf05bd1', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); diff --git a/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php b/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php index e7495160ec0..0c4860aaf9c 100644 --- a/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php +++ b/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/TemplateTagValueNode.php @@ -13,17 +13,21 @@ class TemplateTagValueNode implements \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTag public $name; /** @var TypeNode|null */ public $bound; + /** @var TypeNode|null */ + public $default; /** @var string (may be empty) */ public $description; - public function __construct(string $name, ?TypeNode $bound, string $description) + public function __construct(string $name, ?TypeNode $bound, string $description, ?TypeNode $default = null) { $this->name = $name; $this->bound = $bound; + $this->default = $default; $this->description = $description; } public function __toString() : string { $bound = $this->bound !== null ? " of {$this->bound}" : ''; - return trim("{$this->name}{$bound} {$this->description}"); + $default = $this->default !== null ? " = {$this->default}" : ''; + return trim("{$this->name}{$bound}{$default} {$this->description}"); } } diff --git a/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php b/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php index 674a81e0d42..0db83d09dda 100644 --- a/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php +++ b/vendor/phpstan/phpdoc-parser/src/Parser/PhpDocParser.php @@ -311,8 +311,13 @@ class PhpDocParser } else { $bound = null; } + if ($tokens->tryConsumeTokenValue('=')) { + $default = $this->typeParser->parse($tokens); + } else { + $default = null; + } $description = $this->parseOptionalDescription($tokens); - return new Ast\PhpDoc\TemplateTagValueNode($name, $bound, $description); + return new Ast\PhpDoc\TemplateTagValueNode($name, $bound, $description, $default); } private function parseExtendsTagValue(string $tagName, \PHPStan\PhpDocParser\Parser\TokenIterator $tokens) : Ast\PhpDoc\PhpDocTagValueNode {