Skip to content

Commit

Permalink
Updated Rector to commit eb5df4dde7515bbc497af6da84d5f9dbf96399d8
Browse files Browse the repository at this point in the history
rectorphp/rector-src@eb5df4d Use vendor-patches main branch (#6453)
  • Loading branch information
TomasVotruba committed Nov 20, 2024
1 parent e23b504 commit 9a4a5b2
Show file tree
Hide file tree
Showing 1,689 changed files with 12,954 additions and 16,830 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/along_other_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
php_version: ['7.4', '8.0', '8.1']
commands:
-
name: 'Composer Dependency'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
php_version: ['7.4', '8.0', '8.1']
directory:
- 'e2e/define-constant'
- 'e2e/dont-execute-code'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
php_version: ['7.4', '8.0', '8.1']
directory:
- 'e2e/attributes'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_global.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.2', '7.3', '7.4', '8.0', '8.1']
php_version: ['7.4', '8.0', '8.1']
directory:
- 'e2e/global-install'

Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/e2e_php72.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/standalone_rule_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.3']
php_version: ['7.4']
directory:
- 'e2e/rector-prefixed-rule-test'

Expand Down
2 changes: 1 addition & 1 deletion bin/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class AutoloadIncluder
/**
* @var string[]
*/
private $alreadyLoadedAutoloadFiles = [];
private array $alreadyLoadedAutoloadFiles = [];
public function includeDependencyOrRepositoryVendorAutoloadIfExists() : void
{
// Rector's vendor is already loaded
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"bin/rector"
],
"require": {
"php": "^7.2|^8.0",
"phpstan/phpstan": "^1.12.5"
"php": "^7.4|^8.0",
"phpstan/phpstan": "^2.0.1"
},
"autoload": {
"files": [
Expand Down
1 change: 0 additions & 1 deletion config/phpstan/parser.neon
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ services:
class: PHPStan\Parser\RichParser
arguments:
parser: @currentPhpVersionPhpParser
lexer: @currentPhpVersionLexer
autowired: no
6 changes: 0 additions & 6 deletions config/phpstan/static-reflection.neon
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
parameters:
# see https://github.com/rectorphp/rector/issues/3490#issue-634342324
featureToggles:
disableRuntimeReflectionProvider: false
nodeConnectingVisitorCompatibility: false

services:
- Rector\NodeTypeResolver\Reflection\BetterReflection\RectorBetterReflectionSourceLocatorFactory
- Rector\NodeTypeResolver\Reflection\BetterReflection\SourceLocator\IntermediateSourceLocator
Expand Down
11 changes: 0 additions & 11 deletions e2e/reflection-union-php72/composer.json

This file was deleted.

17 changes: 0 additions & 17 deletions e2e/reflection-union-php72/rector.php

This file was deleted.

14 changes: 0 additions & 14 deletions e2e/reflection-union-php72/src/foo.php

This file was deleted.

40 changes: 24 additions & 16 deletions preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/TokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/KeywordEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Comment.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php';
Expand Down Expand Up @@ -56,28 +57,30 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/Differ.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenPolyfill.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Internal/TokenStream.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/JsonDecoder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/Emulative.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/AttributeEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/CoaleseEqualTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/EnumTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ExplicitOctalEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FlexibleDocStringEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/FnTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/MatchTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NullsafeTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyFunctionTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReadonlyTokenEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Lexer/TokenEmulator/ReverseEmulator.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Modifiers.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NameContext.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Arg.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/ArrayItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Attribute.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/AttributeGroup.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/ClosureUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/DeclareItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php';
Expand Down Expand Up @@ -135,7 +138,6 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Error.php';
Expand Down Expand Up @@ -169,25 +171,32 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Identifier.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/InterpolatedStringPart.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/IntersectionType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/MatchArm.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/FullyQualified.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Name/Relative.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/NullableType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyHook.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/PropertyItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/DNumber.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/EncapsedStringPart.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Float_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Int_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/InterpolatedString.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Class_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Dir.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/File.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Function_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Line.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Method.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Namespace_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Property.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/String_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/StaticVar.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Block.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Break_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php';
Expand All @@ -196,7 +205,6 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php';
Expand All @@ -220,12 +228,9 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Nop.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php';
Expand All @@ -236,23 +241,26 @@
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/UnionType.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/UseItem.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VarLikeIdentifier.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Node/VariadicPlaceholder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeFinder.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CommentAnnotatingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Tokens.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Parser/Php8.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/ParserFactory.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PhpVersion.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/Token.php';
require_once __DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/compatibility_tokens.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/Node.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Lexer/Lexer.php';
Expand All @@ -272,7 +280,6 @@
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstExprTrueNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/ConstFetchNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/DoctrineConstExprStringNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/ConstExpr/QuoteAwareConstExprStringNode.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeTraverser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/NodeVisitor/CloningVisitor.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/AssertTagMethodValueNode.php';
Expand Down Expand Up @@ -338,6 +345,7 @@
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/StringUnescaper.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/TokenIterator.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Parser/TypeParser.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/ParserConfig.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/DiffElem.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/Differ.php';
require_once __DIR__ . '/vendor/phpstan/phpdoc-parser/src/Printer/Printer.php';
6 changes: 2 additions & 4 deletions rules/Arguments/ArgumentDefaultValueReplacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ final class ArgumentDefaultValueReplacer
{
/**
* @readonly
* @var \Rector\PhpParser\Node\NodeFactory
*/
private $nodeFactory;
private NodeFactory $nodeFactory;
/**
* @readonly
* @var \Rector\PhpParser\Node\Value\ValueResolver
*/
private $valueResolver;
private ValueResolver $valueResolver;
public function __construct(NodeFactory $nodeFactory, ValueResolver $valueResolver)
{
$this->nodeFactory = $nodeFactory;
Expand Down
3 changes: 1 addition & 2 deletions rules/Arguments/NodeAnalyzer/ArgumentAddingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ final class ArgumentAddingScope
{
/**
* @readonly
* @var \Rector\NodeNameResolver\NodeNameResolver
*/
private $nodeNameResolver;
private NodeNameResolver $nodeNameResolver;
/**
* @api
* @var string
Expand Down
12 changes: 5 additions & 7 deletions rules/Arguments/NodeAnalyzer/ChangedArgumentsDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
declare (strict_types=1);
namespace Rector\Arguments\NodeAnalyzer;

use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Param;
use PHPStan\Type\Type;
Expand All @@ -13,19 +14,16 @@ final class ChangedArgumentsDetector
{
/**
* @readonly
* @var \Rector\PhpParser\Node\Value\ValueResolver
*/
private $valueResolver;
private ValueResolver $valueResolver;
/**
* @readonly
* @var \Rector\StaticTypeMapper\StaticTypeMapper
*/
private $staticTypeMapper;
private StaticTypeMapper $staticTypeMapper;
/**
* @readonly
* @var \Rector\NodeTypeResolver\TypeComparator\TypeComparator
*/
private $typeComparator;
private TypeComparator $typeComparator;
public function __construct(ValueResolver $valueResolver, StaticTypeMapper $staticTypeMapper, TypeComparator $typeComparator)
{
$this->valueResolver = $valueResolver;
Expand All @@ -44,7 +42,7 @@ public function isDefaultValueChanged(Param $param, $value) : bool
}
public function isTypeChanged(Param $param, ?Type $newType) : bool
{
if ($param->type === null) {
if (!$param->type instanceof Node) {
return \false;
}
if (!$newType instanceof Type) {
Expand Down
Loading

0 comments on commit 9a4a5b2

Please sign in to comment.