mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 0e5343cb24ce394701c5321eb5976573dd8c0afe
0e5343cb24
Few PHPStan fixes (#5900)
This commit is contained in:
parent
9a455bf300
commit
fce5bf1293
@ -4,7 +4,6 @@ declare (strict_types=1);
|
||||
namespace Rector\Arguments;
|
||||
|
||||
use PhpParser\BuilderHelpers;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Arg;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\ClassConstFetch;
|
||||
@ -35,9 +34,12 @@ final class ArgumentDefaultValueReplacer
|
||||
$this->valueResolver = $valueResolver;
|
||||
}
|
||||
/**
|
||||
* @template TCall as (MethodCall|StaticCall|ClassMethod|FuncCall|New_)
|
||||
*
|
||||
* @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\New_ $node
|
||||
* @return TCall|null
|
||||
*/
|
||||
public function processReplaces($node, ReplaceArgumentDefaultValueInterface $replaceArgumentDefaultValue) : ?Node
|
||||
public function processReplaces($node, ReplaceArgumentDefaultValueInterface $replaceArgumentDefaultValue)
|
||||
{
|
||||
if ($node instanceof ClassMethod) {
|
||||
if (!isset($node->params[$replaceArgumentDefaultValue->getPosition()])) {
|
||||
@ -78,7 +80,10 @@ final class ArgumentDefaultValueReplacer
|
||||
return $classMethod;
|
||||
}
|
||||
/**
|
||||
* @template TCall as (MethodCall|StaticCall|FuncCall|New_)
|
||||
*
|
||||
* @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Expr\FuncCall|\PhpParser\Node\Expr\New_ $expr
|
||||
* @return TCall|null
|
||||
*/
|
||||
private function processArgs($expr, ReplaceArgumentDefaultValueInterface $replaceArgumentDefaultValue) : ?Expr
|
||||
{
|
||||
|
@ -76,6 +76,7 @@ final class ClassRenamer
|
||||
}
|
||||
/**
|
||||
* @param array<string, string> $oldToNewClasses
|
||||
* @return ($node is FullyQualified ? FullyQualified : Node)
|
||||
*/
|
||||
public function renameNode(Node $node, array $oldToNewClasses, ?Scope $scope) : ?Node
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '7d65537690d8d788b595b46f026920b4b17eaaf5';
|
||||
public const PACKAGE_VERSION = '0e5343cb24ce394701c5321eb5976573dd8c0afe';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-05-19 19:12:26';
|
||||
public const RELEASE_DATE = '2024-05-19 17:43:22';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -50,6 +50,7 @@ final class RectorWithLineChange implements SerializableInterface
|
||||
*/
|
||||
public static function decode(array $json) : \RectorPrefix202405\Symplify\EasyParallel\Contract\SerializableInterface
|
||||
{
|
||||
/** @var class-string<RectorInterface> $rectorClass */
|
||||
$rectorClass = $json[self::KEY_RECTOR_CLASS];
|
||||
Assert::string($rectorClass);
|
||||
$line = $json[self::KEY_LINE];
|
||||
|
@ -153,8 +153,9 @@ final class UnionTypeMapper implements TypeMapperInterface
|
||||
}
|
||||
/**
|
||||
* @param TypeKind::* $typeKind
|
||||
* @return \PhpParser\Node\NullableType|\PhpParser\Node\ComplexType|PhpParserUnionType|null
|
||||
*/
|
||||
private function mapNullabledType(Type $nullabledType, string $typeKind) : ?Node
|
||||
private function mapNullabledType(Type $nullabledType, string $typeKind)
|
||||
{
|
||||
// void cannot be nullable
|
||||
if ($nullabledType->isVoid()->yes()) {
|
||||
|
@ -8,7 +8,6 @@ use PhpParser\Node\Expr\Closure;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassLike;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Function_;
|
||||
use PhpParser\NodeFinder;
|
||||
@ -139,7 +138,7 @@ final class BetterNodeFinder
|
||||
/**
|
||||
* @api symfony
|
||||
* @param Node[] $nodes
|
||||
* @return ClassLike|null
|
||||
* @return Class_|null
|
||||
*/
|
||||
public function findFirstNonAnonymousClass(array $nodes) : ?Node
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user