Updated Rector to commit d060796fa7

d060796fa7 [Scoped] Add rector-laravel and rector-phpoffice to conflict in target repo (#975)
This commit is contained in:
Tomas Votruba 2021-10-07 19:06:33 +00:00
parent 6154cc59ea
commit 7ea6373fd7
26 changed files with 67 additions and 65 deletions

View File

@ -27,6 +27,8 @@
"rector/rector-symfony": "*",
"rector/rector-doctrine": "*",
"rector/rector-nette": "*",
"rector/rector-cakephp": "*"
"rector/rector-cakephp": "*",
"rector/rector-laravel": "*",
"rector/rector-phpoffice": "*"
}
}

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'f2afe8ed6edb2e91082158c3a7b317b72a46fde8';
public const PACKAGE_VERSION = 'd060796fa7c0246989c3537be3aa50113eaeeff9';
/**
* @var string
*/
public const RELEASE_DATE = '2021-10-07 18:38:20';
public const RELEASE_DATE = '2021-10-07 18:52:56';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20211007\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 ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83::getLoader();
return ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83
class ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179', '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\ComposerStaticInitb370113e68d2f689ade55d3318a17c83::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit9c2a72105be11254c26a0fea1c3bd179::getInitializer($loader));
} else {
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
@ -42,19 +42,19 @@ class ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitb370113e68d2f689ade55d3318a17c83::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit9c2a72105be11254c26a0fea1c3bd179::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequireb370113e68d2f689ade55d3318a17c83($fileIdentifier, $file);
composerRequire9c2a72105be11254c26a0fea1c3bd179($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequireb370113e68d2f689ade55d3318a17c83($fileIdentifier, $file)
function composerRequire9c2a72105be11254c26a0fea1c3bd179($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

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

View File

@ -1228,17 +1228,17 @@
},
{
"name": "rector\/rector-doctrine",
"version": "0.11.20",
"version_normalized": "0.11.20.0",
"version": "0.11.21",
"version_normalized": "0.11.21.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git",
"reference": "b88e1a3a3bdd81bac94a8146749d0d5ceb517fc5"
"reference": "ecb2ab4d5e388edcfcc40caa3d6639fe84b27ba2"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/b88e1a3a3bdd81bac94a8146749d0d5ceb517fc5",
"reference": "b88e1a3a3bdd81bac94a8146749d0d5ceb517fc5",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/ecb2ab4d5e388edcfcc40caa3d6639fe84b27ba2",
"reference": "ecb2ab4d5e388edcfcc40caa3d6639fe84b27ba2",
"shasum": ""
},
"require": {
@ -1259,7 +1259,7 @@
"symplify\/phpstan-rules": "^9.4",
"symplify\/rule-doc-generator": "^9.4"
},
"time": "2021-10-04T21:40:37+00:00",
"time": "2021-10-07T18:48:47+00:00",
"type": "rector-extension",
"extra": {
"branch-alias": {
@ -1284,7 +1284,7 @@
"description": "Rector upgrades rules for Doctrine",
"support": {
"issues": "https:\/\/github.com\/rectorphp\/rector-doctrine\/issues",
"source": "https:\/\/github.com\/rectorphp\/rector-doctrine\/tree\/0.11.20"
"source": "https:\/\/github.com\/rectorphp\/rector-doctrine\/tree\/0.11.21"
},
"install-path": "..\/rector\/rector-doctrine"
},
@ -1350,17 +1350,17 @@
},
{
"name": "rector\/rector-nette",
"version": "0.11.26",
"version_normalized": "0.11.26.0",
"version": "0.11.27",
"version_normalized": "0.11.27.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-nette.git",
"reference": "3b3ba4aa8cc7fb9e223cd59424fc3f49a1001772"
"reference": "c7bd5e4c04971bf3746d7498f45f41d328523e11"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-nette\/zipball\/3b3ba4aa8cc7fb9e223cd59424fc3f49a1001772",
"reference": "3b3ba4aa8cc7fb9e223cd59424fc3f49a1001772",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-nette\/zipball\/c7bd5e4c04971bf3746d7498f45f41d328523e11",
"reference": "c7bd5e4c04971bf3746d7498f45f41d328523e11",
"shasum": ""
},
"require": {
@ -1386,7 +1386,7 @@
"symplify\/phpstan-rules": "^9.4",
"symplify\/rule-doc-generator": "^9.4"
},
"time": "2021-10-04T21:38:25+00:00",
"time": "2021-10-07T18:44:46+00:00",
"type": "rector-extension",
"extra": {
"branch-alias": {
@ -1411,7 +1411,7 @@
"description": "Rector upgrades rules for Nette Framework",
"support": {
"issues": "https:\/\/github.com\/rectorphp\/rector-nette\/issues",
"source": "https:\/\/github.com\/rectorphp\/rector-nette\/tree\/0.11.26"
"source": "https:\/\/github.com\/rectorphp\/rector-nette\/tree\/0.11.27"
},
"install-path": "..\/rector\/rector-nette"
},
@ -1538,17 +1538,17 @@
},
{
"name": "rector\/rector-symfony",
"version": "0.11.22",
"version_normalized": "0.11.22.0",
"version": "0.11.23",
"version_normalized": "0.11.23.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
"reference": "6cd6f87e8202d60682f74e324e5866efb3445830"
"reference": "dc9420ee9ae2623b0cc1080b0792420a2585d9ed"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/6cd6f87e8202d60682f74e324e5866efb3445830",
"reference": "6cd6f87e8202d60682f74e324e5866efb3445830",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/dc9420ee9ae2623b0cc1080b0792420a2585d9ed",
"reference": "dc9420ee9ae2623b0cc1080b0792420a2585d9ed",
"shasum": ""
},
"require": {
@ -1571,7 +1571,7 @@
"symplify\/phpstan-rules": "^9.4",
"symplify\/rule-doc-generator": "^9.4"
},
"time": "2021-10-07T17:26:16+00:00",
"time": "2021-10-07T18:42:06+00:00",
"type": "rector-extension",
"extra": {
"branch-alias": {
@ -1596,7 +1596,7 @@
"description": "Rector upgrades rules for Symfony Framework",
"support": {
"issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues",
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.22"
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.23"
},
"install-path": "..\/rector\/rector-symfony"
},

File diff suppressed because one or more lines are too long

View File

@ -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' => '0.11.4'), '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' => '0.11.20'), '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' => '0.11.7'), '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' => '0.11.26'), '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' => '0.11.3'), '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' => '0.11.10'), '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' => '0.11.22'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.26'));
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' => '0.11.4'), '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' => '0.11.21'), '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' => '0.11.7'), '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' => '0.11.27'), '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' => '0.11.3'), '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' => '0.11.10'), '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' => '0.11.23'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'v0.11.26'));
private function __construct()
{
}

View File

@ -65,7 +65,7 @@ final class ParamFactory
}
$variable = new \PhpParser\Node\Expr\Variable($propertyName);
$param = new \PhpParser\Node\Param($variable);
$paramType = $this->nodeTypeResolver->getStaticType($propertyFetch);
$paramType = $this->nodeTypeResolver->getType($propertyFetch);
$paramTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($paramType, \Rector\PHPStanStaticTypeMapper\ValueObject\TypeKind::PARAM());
// the param is optional - make it nullable
if (\in_array($propertyName, $optionalParamNames, \true)) {

View File

@ -164,7 +164,7 @@ CODE_SAMPLE
if (!$onlyParam->type) {
return \false;
}
$paramType = $this->nodeTypeResolver->getStaticType($onlyParam);
$paramType = $this->nodeTypeResolver->getType($onlyParam);
// we have a match
return $paramType instanceof \PHPStan\Type\ArrayType;
}

View File

@ -68,7 +68,7 @@ final class ArrayDimFetchControlTypeResolver implements \Rector\Nette\Contract\F
}
private function matchCreateComponentClassMethod(\PhpParser\Node\Expr\ArrayDimFetch $arrayDimFetch, string $controlShortName) : ?\PhpParser\Node\Stmt\ClassMethod
{
$callerType = $this->nodeTypeResolver->getStaticType($arrayDimFetch->var);
$callerType = $this->nodeTypeResolver->getType($arrayDimFetch->var);
if (!$callerType instanceof \PHPStan\Type\TypeWithClassName) {
return null;
}

View File

@ -44,7 +44,7 @@ final class AssignDimFetchFormTypeResolver implements \Rector\Nette\Contract\For
if (!$node->dim instanceof \PhpParser\Node\Scalar\String_) {
return [];
}
$exprType = $this->nodeTypeResolver->getStaticType($formVariableAssign->expr);
$exprType = $this->nodeTypeResolver->getType($formVariableAssign->expr);
if (!$exprType instanceof \PHPStan\Type\TypeWithClassName) {
return [];
}

View File

@ -63,7 +63,7 @@ final class GetComponentMethodCallFormControlTypeResolver implements \Rector\Net
return [];
}
$createComponentClassMethodName = $this->createCreateComponentMethodName($node);
$staticType = $this->nodeTypeResolver->getStaticType($node);
$staticType = $this->nodeTypeResolver->getType($node);
if (!$staticType instanceof \Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType) {
return [];
}
@ -73,7 +73,7 @@ final class GetComponentMethodCallFormControlTypeResolver implements \Rector\Net
if ($constructorClassMethod !== null) {
$constructorClassMethodData = $this->methodNamesByInputNamesResolver->resolveExpr($constructorClassMethod);
}
$callerType = $this->nodeTypeResolver->getStaticType($node->var);
$callerType = $this->nodeTypeResolver->getType($node->var);
if (!$callerType instanceof \PHPStan\Type\TypeWithClassName) {
return $constructorClassMethodData;
}

View File

@ -72,7 +72,7 @@ final class MagicNetteFactoryInterfaceFormControlTypeResolver implements \Rector
if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) {
return [];
}
$returnedType = $this->nodeTypeResolver->getStaticType($node);
$returnedType = $this->nodeTypeResolver->getType($node);
if (!$returnedType instanceof \PHPStan\Type\TypeWithClassName) {
return [];
}

View File

@ -55,7 +55,7 @@ final class VariableConstructorFormControlTypeResolver implements \Rector\Nette\
if ($this->nodeNameResolver->isName($node, 'this')) {
return [];
}
$formType = $this->nodeTypeResolver->getStaticType($node);
$formType = $this->nodeTypeResolver->getType($node);
if (!$formType instanceof \PHPStan\Type\TypeWithClassName) {
return [];
}

View File

@ -40,7 +40,7 @@ final class VariableWithTypesFactory
{
$variablesWithTypes = [];
foreach ($args as $arg) {
$staticType = $this->nodeTypeResolver->getStaticType($arg->value);
$staticType = $this->nodeTypeResolver->getType($arg->value);
$variableName = $this->variableNaming->resolveFromNodeAndType($arg, $staticType);
if ($variableName === null) {
throw new \Rector\Core\Exception\ShouldNotHappenException();

View File

@ -156,7 +156,7 @@ CODE_SAMPLE
if (!$expr->dim instanceof \PhpParser\Node\Scalar\String_) {
return \false;
}
$varStaticType = $this->getStaticType($expr->var);
$varStaticType = $this->getType($expr->var);
if (!$varStaticType instanceof \PHPStan\Type\TypeWithClassName) {
return \false;
}

View File

@ -121,7 +121,7 @@ CODE_SAMPLE
if (!$this->isName($propertyFetch->var, 'template')) {
continue;
}
$staticType = $this->getStaticType($stmt->expr->expr);
$staticType = $this->getType($stmt->expr->expr);
$varTypes[] = new \Rector\Nette\ValueObject\LatteVariableType((string) $this->getName($propertyFetch->name), $staticType->describe(\PHPStan\Type\VerbosityLevel::typeOnly()));
}
return $varTypes;

View File

@ -168,7 +168,7 @@ CODE_SAMPLE
if (!$this->isName($propertyFetch->var, 'template')) {
continue;
}
$staticType = $this->getStaticType($stmt->expr->expr);
$staticType = $this->getType($stmt->expr->expr);
$varTypes[] = new \Rector\Nette\ValueObject\LatteVariableType((string) $this->getName($propertyFetch->name), $staticType->describe(\PHPStan\Type\VerbosityLevel::typeOnly()));
}
return $varTypes;

View File

@ -113,7 +113,7 @@ final class ThisRenderFactory
}
private function resolveMethodCall(\PhpParser\Node\Expr\MethodCall $methodCall) : ?\PhpParser\Node\Expr
{
$returnStaticType = $this->nodeTypeResolver->getStaticType($methodCall);
$returnStaticType = $this->nodeTypeResolver->getType($methodCall);
if ($returnStaticType instanceof \PHPStan\Type\ArrayType) {
return $methodCall;
}

View File

@ -123,8 +123,8 @@ CODE_SAMPLE
}
/** @var Expr $else */
$else = $ternary->else;
$ifType = $this->getStaticType($if);
$elseType = $this->getStaticType($else);
$ifType = $this->getType($if);
$elseType = $this->getType($else);
return $ifType instanceof \PHPStan\Type\IntegerType && $elseType instanceof \PHPStan\Type\IntegerType;
}
private function processReturn0ToMethod(bool $hasReturn, \PhpParser\Node\Stmt\ClassMethod $classMethod) : void
@ -164,7 +164,7 @@ CODE_SAMPLE
return;
}
}
$staticType = $this->getStaticType($return->expr);
$staticType = $this->getType($return->expr);
if (!$staticType instanceof \PHPStan\Type\IntegerType) {
$return->expr = new \PhpParser\Node\Expr\Cast\Int_($return->expr);
}

View File

@ -182,7 +182,7 @@ CODE_SAMPLE
return \false;
}
$responseObjectType = new \PHPStan\Type\ObjectType(self::RESPONSE_CLASS);
$returnType = $this->getStaticType($lastReturn->expr);
$returnType = $this->getType($lastReturn->expr);
return $responseObjectType->isSuperTypeOf($returnType)->yes();
}
private function refactorReturn(\PhpParser\Node\Stmt\Return_ $return, \PhpParser\Node\Stmt\ClassMethod $classMethod, \Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode $templateDoctrineAnnotationTagValueNode, bool $hasThisRenderOrReturnsResponse) : void
@ -205,7 +205,7 @@ CODE_SAMPLE
{
/** @var Expr $lastReturnExpr */
$lastReturnExpr = $return->expr;
$returnStaticType = $this->getStaticType($lastReturnExpr);
$returnStaticType = $this->getType($lastReturnExpr);
if (!$return->expr instanceof \PhpParser\Node\Expr\MethodCall) {
if (!$hasThisRenderOrReturnsResponse || $returnStaticType instanceof \PHPStan\Type\Constant\ConstantArrayType) {
$return->expr = $thisRenderMethodCall;

View File

@ -123,7 +123,7 @@ CODE_SAMPLE
return null;
}
$commandName = $node->args[0]->value;
$commandNameStaticType = $this->getStaticType($commandName);
$commandNameStaticType = $this->getType($commandName);
if (!$commandNameStaticType instanceof \PHPStan\Type\StringType) {
return null;
}
@ -176,7 +176,7 @@ CODE_SAMPLE
if (\count($staticCall->args) < 1) {
return null;
}
$staticType = $this->getStaticType($staticCall->args[0]->value);
$staticType = $this->getType($staticCall->args[0]->value);
if (!$staticType instanceof \PHPStan\Type\StringType) {
return null;
}

View File

@ -140,7 +140,7 @@ CODE_SAMPLE
if (!$firstArg instanceof \PhpParser\Node\Arg) {
return \false;
}
$eventStaticType = $this->getStaticType($firstArg->value);
$eventStaticType = $this->getType($firstArg->value);
if (!$eventStaticType instanceof \PHPStan\Type\ObjectType) {
return \false;
}

View File

@ -85,7 +85,7 @@ CODE_SAMPLE
return null;
}
// type analyzer
$activeValueType = $this->getStaticType($activeArgValue);
$activeValueType = $this->getType($activeArgValue);
if ($activeValueType instanceof \PHPStan\Type\StringType) {
$this->processStringType($node, $argumentPosition, $activeArgValue);
}

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('RectorPrefix20211007\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83', false) && !interface_exists('ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83', false) && !trait_exists('ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83', false)) {
spl_autoload_call('RectorPrefix20211007\ComposerAutoloaderInitb370113e68d2f689ade55d3318a17c83');
if (!class_exists('ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179', false) && !interface_exists('ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179', false) && !trait_exists('ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179', false)) {
spl_autoload_call('RectorPrefix20211007\ComposerAutoloaderInit9c2a72105be11254c26a0fea1c3bd179');
}
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('RectorPrefix20211007\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -3306,9 +3306,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20211007\print_node(...func_get_args());
}
}
if (!function_exists('composerRequireb370113e68d2f689ade55d3318a17c83')) {
function composerRequireb370113e68d2f689ade55d3318a17c83() {
return \RectorPrefix20211007\composerRequireb370113e68d2f689ade55d3318a17c83(...func_get_args());
if (!function_exists('composerRequire9c2a72105be11254c26a0fea1c3bd179')) {
function composerRequire9c2a72105be11254c26a0fea1c3bd179() {
return \RectorPrefix20211007\composerRequire9c2a72105be11254c26a0fea1c3bd179(...func_get_args());
}
}
if (!function_exists('parseArgs')) {