diff --git a/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php b/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php index 875f67726e7..9d38a5355c0 100644 --- a/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php +++ b/packages/BetterPhpDocParser/PhpDoc/DoctrineAnnotationTagValueNode.php @@ -43,7 +43,7 @@ final class DoctrineAnnotationTagValueNode extends \Rector\BetterPhpDocParser\Va /** * @param string[] $classNames */ - public function hasClassNames(array $classNames) : bool + public function hasClassNames($classNames) : bool { foreach ($classNames as $className) { if ($this->hasClassName($className)) { @@ -52,7 +52,10 @@ final class DoctrineAnnotationTagValueNode extends \Rector\BetterPhpDocParser\Va } return \false; } - public function hasClassName(string $className) : bool + /** + * @param string $className + */ + public function hasClassName($className) : bool { $annotationName = \trim($this->identifierTypeNode->name, '@'); if ($annotationName === $className) { diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ArrayTypePhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ArrayTypePhpDocNodeVisitor.php index 897af8f9c88..1d523ebfd06 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ArrayTypePhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ArrayTypePhpDocNodeVisitor.php @@ -20,7 +20,10 @@ final class ArrayTypePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\Si { $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\ArrayTypeNode) { return null; diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/CallableTypePhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/CallableTypePhpDocNodeVisitor.php index 7e10a3e788e..4130126f7c1 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/CallableTypePhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/CallableTypePhpDocNodeVisitor.php @@ -20,7 +20,10 @@ final class CallableTypePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify { $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\CallableTypeNode) { return null; diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ChangedPhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ChangedPhpDocNodeVisitor.php index e7dffc2dcdd..50647d6e22c 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ChangedPhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ChangedPhpDocNodeVisitor.php @@ -12,11 +12,17 @@ final class ChangedPhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\Simp * @var bool */ private $hasChanged = \false; - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { $this->hasChanged = \false; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { $origNode = $node->getAttribute(\Rector\BetterPhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE); if ($origNode === null) { diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/IntersectionTypeNodePhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/IntersectionTypeNodePhpDocNodeVisitor.php index ab7f738912e..5d8c6f88d58 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/IntersectionTypeNodePhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/IntersectionTypeNodePhpDocNodeVisitor.php @@ -20,7 +20,10 @@ final class IntersectionTypeNodePhpDocNodeVisitor extends \RectorPrefix20211210\ { $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\IntersectionTypeNode) { return null; diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ParamPhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ParamPhpDocNodeVisitor.php index fa7a30f8217..dcfc47336b1 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/ParamPhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/ParamPhpDocNodeVisitor.php @@ -20,7 +20,10 @@ final class ParamPhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\Simple { $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode) { return null; diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/TemplatePhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/TemplatePhpDocNodeVisitor.php index 146e9b62fcf..18dea0e4426 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/TemplatePhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/TemplatePhpDocNodeVisitor.php @@ -32,7 +32,10 @@ final class TemplatePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\Sim $this->currentTokenIteratorProvider = $currentTokenIteratorProvider; $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode) { return null; diff --git a/packages/BetterPhpDocParser/PhpDocNodeVisitor/UnionTypeNodePhpDocNodeVisitor.php b/packages/BetterPhpDocParser/PhpDocNodeVisitor/UnionTypeNodePhpDocNodeVisitor.php index 90710fe43ac..8441f49ed68 100644 --- a/packages/BetterPhpDocParser/PhpDocNodeVisitor/UnionTypeNodePhpDocNodeVisitor.php +++ b/packages/BetterPhpDocParser/PhpDocNodeVisitor/UnionTypeNodePhpDocNodeVisitor.php @@ -31,7 +31,10 @@ final class UnionTypeNodePhpDocNodeVisitor extends \RectorPrefix20211210\Symplif $this->currentTokenIteratorProvider = $currentTokenIteratorProvider; $this->attributeMirrorer = $attributeMirrorer; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\UnionTypeNode) { return null; diff --git a/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php b/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php index ae2c045f83c..c6aeb250c5e 100644 --- a/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php +++ b/packages/BetterPhpDocParser/ValueObject/PhpDoc/DoctrineAnnotation/AbstractValuesAwareNode.php @@ -47,7 +47,10 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD $this->silentKey = $silentKey; $this->originalValues = $values; } - public function removeValue(string $key) : void + /** + * @param string $key + */ + public function removeValue($key) : void { $quotedKey = '"' . $key . '"'; // isset? @@ -80,8 +83,9 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD } /** * @param mixed $value + * @param string $key */ - public function changeValue(string $key, $value) : void + public function changeValue($key, $value) : void { // is quoted? if (isset($this->values[$key]) && \is_string($this->values[$key]) && \Rector\Core\Util\StringUtils::isMatch($this->values[$key], self::UNQUOTED_VALUE_REGEX)) { @@ -178,7 +182,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD * @param mixed[] $values * @return array */ - protected function removeQuotesFromArray(array $values) : array + protected function removeQuotesFromArray($values) : array { $unquotedArray = []; foreach ($values as $key => $value) { @@ -191,7 +195,7 @@ abstract class AbstractValuesAwareNode implements \PHPStan\PhpDocParser\Ast\PhpD /** * @param mixed[] $values */ - protected function printValuesContent(array $values) : string + protected function printValuesContent($values) : string { $itemContents = ''; \end($values); diff --git a/packages/Comments/NodeVisitor/CommentRemovingNodeVisitor.php b/packages/Comments/NodeVisitor/CommentRemovingNodeVisitor.php index 623b178008b..a77c6ecdde0 100644 --- a/packages/Comments/NodeVisitor/CommentRemovingNodeVisitor.php +++ b/packages/Comments/NodeVisitor/CommentRemovingNodeVisitor.php @@ -8,7 +8,10 @@ use PhpParser\NodeVisitorAbstract; use Rector\NodeTypeResolver\Node\AttributeKey; final class CommentRemovingNodeVisitor extends \PhpParser\NodeVisitorAbstract { - public function enterNode(\PhpParser\Node $node) : \PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : \PhpParser\Node { // the node must be cloned, so original node is not touched in final print $clonedNode = clone $node; diff --git a/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php b/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php index be74a1fc7d9..74eb615955c 100644 --- a/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php +++ b/packages/NodeNameResolver/Contract/NodeNameResolverInterface.php @@ -14,7 +14,7 @@ interface NodeNameResolverInterface */ public function getNode() : string; /** - * @param TNode $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string; + public function resolve($node) : ?string; } diff --git a/packages/NodeNameResolver/NodeNameResolver/ClassConstFetchNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/ClassConstFetchNameResolver.php index aca0604cb70..de75619d762 100644 --- a/packages/NodeNameResolver/NodeNameResolver/ClassConstFetchNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/ClassConstFetchNameResolver.php @@ -29,9 +29,9 @@ final class ClassConstFetchNameResolver implements \Rector\NodeNameResolver\Cont return \PhpParser\Node\Expr\ClassConstFetch::class; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { $class = $this->nodeNameResolver->getName($node->class); $name = $this->nodeNameResolver->getName($node->name); diff --git a/packages/NodeNameResolver/NodeNameResolver/ClassConstNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/ClassConstNameResolver.php index 124a36e604c..be14a59060f 100644 --- a/packages/NodeNameResolver/NodeNameResolver/ClassConstNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/ClassConstNameResolver.php @@ -29,9 +29,9 @@ final class ClassConstNameResolver implements \Rector\NodeNameResolver\Contract\ return \PhpParser\Node\Stmt\ClassConst::class; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { if ($node->consts === []) { return null; diff --git a/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php index f191264909b..3928e5bf159 100644 --- a/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/ClassNameResolver.php @@ -30,9 +30,9 @@ final class ClassNameResolver implements \Rector\NodeNameResolver\Contract\NodeN return \PhpParser\Node\Stmt\ClassLike::class; } /** - * @param ClassLike $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { if (\property_exists($node, 'namespacedName') && $node->namespacedName instanceof \PhpParser\Node\Name) { return $node->namespacedName->toString(); diff --git a/packages/NodeNameResolver/NodeNameResolver/EmptyNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/EmptyNameResolver.php index 67c86276ab9..0e87d597a9a 100644 --- a/packages/NodeNameResolver/NodeNameResolver/EmptyNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/EmptyNameResolver.php @@ -16,9 +16,9 @@ final class EmptyNameResolver implements \Rector\NodeNameResolver\Contract\NodeN return \PhpParser\Node\Expr\Empty_::class; } /** - * @param Empty_ $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { return 'empty'; } diff --git a/packages/NodeNameResolver/NodeNameResolver/FuncCallNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/FuncCallNameResolver.php index d80a7378acd..c836ed3e1b3 100644 --- a/packages/NodeNameResolver/NodeNameResolver/FuncCallNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/FuncCallNameResolver.php @@ -32,9 +32,9 @@ final class FuncCallNameResolver implements \Rector\NodeNameResolver\Contract\No * If some function is namespaced, it will be used over global one. * But only if it really exists. * - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { if ($node->name instanceof \PhpParser\Node\Expr) { return null; diff --git a/packages/NodeNameResolver/NodeNameResolver/FunctionNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/FunctionNameResolver.php index d26b2c79842..039cdf0ef54 100644 --- a/packages/NodeNameResolver/NodeNameResolver/FunctionNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/FunctionNameResolver.php @@ -18,9 +18,9 @@ final class FunctionNameResolver implements \Rector\NodeNameResolver\Contract\No return \PhpParser\Node\Stmt\Function_::class; } /** - * @param Function_ $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { $bareName = (string) $node->name; $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); diff --git a/packages/NodeNameResolver/NodeNameResolver/NameNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/NameNameResolver.php index 16a5d336e02..187254a22cb 100644 --- a/packages/NodeNameResolver/NodeNameResolver/NameNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/NameNameResolver.php @@ -28,9 +28,9 @@ final class NameNameResolver implements \Rector\NodeNameResolver\Contract\NodeNa return \PhpParser\Node\Name::class; } /** - * @param Name $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { // possible function parent $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); diff --git a/packages/NodeNameResolver/NodeNameResolver/ParamNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/ParamNameResolver.php index dfc0748de86..3266ad7ea8a 100644 --- a/packages/NodeNameResolver/NodeNameResolver/ParamNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/ParamNameResolver.php @@ -29,9 +29,9 @@ final class ParamNameResolver implements \Rector\NodeNameResolver\Contract\NodeN return \PhpParser\Node\Param::class; } /** - * @param Param $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { return $this->nodeNameResolver->getName($node->var); } diff --git a/packages/NodeNameResolver/NodeNameResolver/PropertyNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/PropertyNameResolver.php index e9740153700..b630bb02da3 100644 --- a/packages/NodeNameResolver/NodeNameResolver/PropertyNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/PropertyNameResolver.php @@ -29,9 +29,9 @@ final class PropertyNameResolver implements \Rector\NodeNameResolver\Contract\No return \PhpParser\Node\Stmt\Property::class; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { if ($node->props === []) { return null; diff --git a/packages/NodeNameResolver/NodeNameResolver/UseNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/UseNameResolver.php index 77d62ee9876..d5564b62618 100644 --- a/packages/NodeNameResolver/NodeNameResolver/UseNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/UseNameResolver.php @@ -29,9 +29,9 @@ final class UseNameResolver implements \Rector\NodeNameResolver\Contract\NodeNam return \PhpParser\Node\Stmt\Use_::class; } /** - * @param Use_ $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { if ($node->uses === []) { return null; diff --git a/packages/NodeNameResolver/NodeNameResolver/VariableNameResolver.php b/packages/NodeNameResolver/NodeNameResolver/VariableNameResolver.php index 1e185f6a2a7..aa9bd45e08f 100644 --- a/packages/NodeNameResolver/NodeNameResolver/VariableNameResolver.php +++ b/packages/NodeNameResolver/NodeNameResolver/VariableNameResolver.php @@ -19,9 +19,9 @@ final class VariableNameResolver implements \Rector\NodeNameResolver\Contract\No return \PhpParser\Node\Expr\Variable::class; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function resolve(\PhpParser\Node $node) : ?string + public function resolve($node) : ?string { $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); // skip $some->$dynamicMethodName() diff --git a/packages/NodeTypeResolver/NodeVisitor/FunctionLikeParamArgPositionNodeVisitor.php b/packages/NodeTypeResolver/NodeVisitor/FunctionLikeParamArgPositionNodeVisitor.php index fe144a08f3f..cb2bec9ce51 100644 --- a/packages/NodeTypeResolver/NodeVisitor/FunctionLikeParamArgPositionNodeVisitor.php +++ b/packages/NodeTypeResolver/NodeVisitor/FunctionLikeParamArgPositionNodeVisitor.php @@ -15,8 +15,9 @@ final class FunctionLikeParamArgPositionNodeVisitor extends \PhpParser\NodeVisit { /** * @return Node + * @param \PhpParser\Node $node */ - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + public function enterNode($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\FunctionLike) { foreach ($node->getParams() as $position => $param) { diff --git a/packages/NodeTypeResolver/NodeVisitor/NamespaceNodeVisitor.php b/packages/NodeTypeResolver/NodeVisitor/NamespaceNodeVisitor.php index e8446472900..d8475aeba98 100644 --- a/packages/NodeTypeResolver/NodeVisitor/NamespaceNodeVisitor.php +++ b/packages/NodeTypeResolver/NodeVisitor/NamespaceNodeVisitor.php @@ -28,7 +28,7 @@ final class NamespaceNodeVisitor extends \PhpParser\NodeVisitorAbstract * @param Node[] $nodes * @return Node[]|null */ - public function beforeTraverse(array $nodes) : ?array + public function beforeTraverse($nodes) : ?array { // init basic use nodes for non-namespaced code /** @var Use_[] $uses */ @@ -36,7 +36,10 @@ final class NamespaceNodeVisitor extends \PhpParser\NodeVisitorAbstract $this->useNodes = $uses; return null; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Namespace_) { /** @var Use_[] $uses */ diff --git a/packages/NodeTypeResolver/NodeVisitor/StatementNodeVisitor.php b/packages/NodeTypeResolver/NodeVisitor/StatementNodeVisitor.php index 72bab9e182b..d021ce150a4 100644 --- a/packages/NodeTypeResolver/NodeVisitor/StatementNodeVisitor.php +++ b/packages/NodeTypeResolver/NodeVisitor/StatementNodeVisitor.php @@ -17,12 +17,15 @@ final class StatementNodeVisitor extends \PhpParser\NodeVisitorAbstract * @param Node[] $nodes * @return Node[]|null */ - public function beforeTraverse(array $nodes) : ?array + public function beforeTraverse($nodes) : ?array { $this->previousStmt = null; return null; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node) { diff --git a/packages/NodeTypeResolver/PHPStan/Scope/NodeVisitor/RemoveDeepChainMethodCallNodeVisitor.php b/packages/NodeTypeResolver/PHPStan/Scope/NodeVisitor/RemoveDeepChainMethodCallNodeVisitor.php index 2a89292c7ec..b38dbf4b101 100644 --- a/packages/NodeTypeResolver/PHPStan/Scope/NodeVisitor/RemoveDeepChainMethodCallNodeVisitor.php +++ b/packages/NodeTypeResolver/PHPStan/Scope/NodeVisitor/RemoveDeepChainMethodCallNodeVisitor.php @@ -36,7 +36,10 @@ final class RemoveDeepChainMethodCallNodeVisitor extends \PhpParser\NodeVisitorA $this->betterNodeFinder = $betterNodeFinder; $this->nestedChainMethodCallLimit = (int) $parameterProvider->provideParameter(\Rector\Core\Configuration\Option::NESTED_CHAIN_METHOD_CALL_LIMIT); } - public function enterNode(\PhpParser\Node $node) : ?int + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?int { if (!$node instanceof \PhpParser\Node\Stmt\Expression) { return null; @@ -52,8 +55,9 @@ final class RemoveDeepChainMethodCallNodeVisitor extends \PhpParser\NodeVisitorA } /** * @return \PhpParser\Node|\PhpParser\Node\Stmt\Nop + * @param \PhpParser\Node $node */ - public function leaveNode(\PhpParser\Node $node) + public function leaveNode($node) { if ($node === $this->removingExpression) { // keep any node, so we don't remove it permanently diff --git a/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php b/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php index 2210569c560..43e4a535d9a 100644 --- a/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php +++ b/packages/NodeTypeResolver/PhpDocNodeVisitor/ClassRenamePhpDocNodeVisitor.php @@ -36,13 +36,19 @@ final class ClassRenamePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\ $this->staticTypeMapper = $staticTypeMapper; $this->currentNodeProvider = $currentNodeProvider; } - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { if ($this->oldToNewTypes === []) { throw new \Rector\Core\Exception\ShouldNotHappenException('Configure "$oldToNewClasses" first'); } } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode) { return null; @@ -73,7 +79,7 @@ final class ClassRenamePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\ /** * @param OldToNewType[] $oldToNewTypes */ - public function setOldToNewTypes(array $oldToNewTypes) : void + public function setOldToNewTypes($oldToNewTypes) : void { $this->oldToNewTypes = $oldToNewTypes; } diff --git a/packages/NodeTypeResolver/PhpDocNodeVisitor/NameImportingPhpDocNodeVisitor.php b/packages/NodeTypeResolver/PhpDocNodeVisitor/NameImportingPhpDocNodeVisitor.php index acd7b684d26..7b5a4948f34 100644 --- a/packages/NodeTypeResolver/PhpDocNodeVisitor/NameImportingPhpDocNodeVisitor.php +++ b/packages/NodeTypeResolver/PhpDocNodeVisitor/NameImportingPhpDocNodeVisitor.php @@ -68,13 +68,19 @@ final class NameImportingPhpDocNodeVisitor extends \RectorPrefix20211210\Symplif $this->currentFileProvider = $currentFileProvider; $this->classLikeExistenceChecker = $classLikeExistenceChecker; } - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { if ($this->currentPhpParserNode === null) { throw new \Rector\Core\Exception\ShouldNotHappenException('Set "$currentPhpParserNode" first'); } } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if ($node instanceof \Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode) { return $this->enterSpacelessPhpDocTagNode($node); @@ -103,7 +109,10 @@ final class NameImportingPhpDocNodeVisitor extends \RectorPrefix20211210\Symplif } return $this->processFqnNameImport($this->currentPhpParserNode, $node, $staticType, $file); } - public function setCurrentNode(\PhpParser\Node $phpParserNode) : void + /** + * @param PhpParserNode $phpParserNode + */ + public function setCurrentNode($phpParserNode) : void { $this->currentPhpParserNode = $phpParserNode; } diff --git a/packages/NodeTypeResolver/PhpDocNodeVisitor/UnderscoreRenamePhpDocNodeVisitor.php b/packages/NodeTypeResolver/PhpDocNodeVisitor/UnderscoreRenamePhpDocNodeVisitor.php index 599f68a655a..358f87cabf2 100644 --- a/packages/NodeTypeResolver/PhpDocNodeVisitor/UnderscoreRenamePhpDocNodeVisitor.php +++ b/packages/NodeTypeResolver/PhpDocNodeVisitor/UnderscoreRenamePhpDocNodeVisitor.php @@ -30,7 +30,10 @@ final class UnderscoreRenamePhpDocNodeVisitor extends \RectorPrefix20211210\Symp { $this->staticTypeMapper = $staticTypeMapper; } - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { if ($this->pseudoNamespaceToNamespace === null) { throw new \Rector\Core\Exception\ShouldNotHappenException('Set PseudoNamespaceToNamespace first'); @@ -39,7 +42,10 @@ final class UnderscoreRenamePhpDocNodeVisitor extends \RectorPrefix20211210\Symp throw new \Rector\Core\Exception\ShouldNotHappenException('Set "$currentPhpParserNode" first'); } } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : ?\PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : ?\PHPStan\PhpDocParser\Ast\Node { if (!$node instanceof \PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode) { return null; @@ -56,11 +62,17 @@ final class UnderscoreRenamePhpDocNodeVisitor extends \RectorPrefix20211210\Symp $slashedName = '\\' . \RectorPrefix20211210\Nette\Utils\Strings::replace($staticType->getClassName(), '#_#', '\\'); return new \PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode($slashedName); } - public function setPseudoNamespaceToNamespace(\Rector\Renaming\ValueObject\PseudoNamespaceToNamespace $pseudoNamespaceToNamespace) : void + /** + * @param \Rector\Renaming\ValueObject\PseudoNamespaceToNamespace $pseudoNamespaceToNamespace + */ + public function setPseudoNamespaceToNamespace($pseudoNamespaceToNamespace) : void { $this->pseudoNamespaceToNamespace = $pseudoNamespaceToNamespace; } - public function setCurrentPhpParserNode(\PhpParser\Node $node) : void + /** + * @param \PhpParser\Node $node + */ + public function setCurrentPhpParserNode($node) : void { $this->currentPhpParserNode = $node; } diff --git a/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocator/IntermediateSourceLocator.php b/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocator/IntermediateSourceLocator.php index 4798b31348a..dc113c64fcd 100644 --- a/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocator/IntermediateSourceLocator.php +++ b/packages/NodeTypeResolver/Reflection/BetterReflection/SourceLocator/IntermediateSourceLocator.php @@ -23,7 +23,11 @@ final class IntermediateSourceLocator implements \PHPStan\BetterReflection\Sourc { $this->sourceLocatorProviders = $sourceLocatorProviders; } - public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection + /** + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\Identifier $identifier + */ + public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection { foreach ($this->sourceLocatorProviders as $sourceLocatorProvider) { $sourceLocator = $sourceLocatorProvider->provide(); @@ -37,8 +41,10 @@ final class IntermediateSourceLocator implements \PHPStan\BetterReflection\Sourc /** * Find all identifiers of a type * @return Reflection[] + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType */ - public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array + public function locateIdentifiersByType($reflector, $identifierType) : array { foreach ($this->sourceLocatorProviders as $sourceLocatorProvider) { $sourceLocator = $sourceLocatorProvider->provide(); diff --git a/packages/PostRector/Rector/ClassRenamingPostRector.php b/packages/PostRector/Rector/ClassRenamingPostRector.php index 7e77e544129..8e485c9337a 100644 --- a/packages/PostRector/Rector/ClassRenamingPostRector.php +++ b/packages/PostRector/Rector/ClassRenamingPostRector.php @@ -30,7 +30,10 @@ final class ClassRenamingPostRector extends \Rector\PostRector\Rector\AbstractPo // must be run before name importing, so new names are imported return 650; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { $oldToNewClasses = $this->renamedClassesDataCollector->getOldToNewClasses(); if ($oldToNewClasses === []) { diff --git a/packages/PostRector/Rector/NameImportingPostRector.php b/packages/PostRector/Rector/NameImportingPostRector.php index af1978dc0f3..5b68e0b89e8 100644 --- a/packages/PostRector/Rector/NameImportingPostRector.php +++ b/packages/PostRector/Rector/NameImportingPostRector.php @@ -71,7 +71,10 @@ final class NameImportingPostRector extends \Rector\PostRector\Rector\AbstractPo $this->currentFileProvider = $currentFileProvider; $this->betterNodeFinder = $betterNodeFinder; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { if (!$this->parameterProvider->provideBoolParameter(\Rector\Core\Configuration\Option::AUTO_IMPORT_NAMES)) { return null; diff --git a/packages/PostRector/Rector/NodeAddingPostRector.php b/packages/PostRector/Rector/NodeAddingPostRector.php index 0d0d15dc9a4..a72238a6ad4 100644 --- a/packages/PostRector/Rector/NodeAddingPostRector.php +++ b/packages/PostRector/Rector/NodeAddingPostRector.php @@ -35,8 +35,9 @@ final class NodeAddingPostRector extends \Rector\PostRector\Rector\AbstractPostR } /** * @return mixed[]|\PhpParser\Node + * @param \PhpParser\Node $node */ - public function leaveNode(\PhpParser\Node $node) + public function leaveNode($node) { $newNodes = [$node]; $nodesToAddAfter = $this->nodesToAddCollector->getNodesToAddAfterNode($node); diff --git a/packages/PostRector/Rector/NodeRemovingPostRector.php b/packages/PostRector/Rector/NodeRemovingPostRector.php index 343dcf36b0d..f9f2cc28b4d 100644 --- a/packages/PostRector/Rector/NodeRemovingPostRector.php +++ b/packages/PostRector/Rector/NodeRemovingPostRector.php @@ -40,7 +40,10 @@ final class NodeRemovingPostRector extends \Rector\PostRector\Rector\AbstractPos { return 800; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { if (!$this->nodesToRemoveCollector->isActive()) { return null; @@ -71,8 +74,9 @@ final class NodeRemovingPostRector extends \Rector\PostRector\Rector\AbstractPos } /** * @return int|\PhpParser\Node + * @param \PhpParser\Node $node */ - public function leaveNode(\PhpParser\Node $node) + public function leaveNode($node) { foreach ($this->nodesToRemoveCollector->getNodesToRemove() as $key => $nodeToRemove) { $nodeToRemoveParent = $nodeToRemove->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); diff --git a/packages/PostRector/Rector/NodeToReplacePostRector.php b/packages/PostRector/Rector/NodeToReplacePostRector.php index fbc94d888e4..dce51a527c4 100644 --- a/packages/PostRector/Rector/NodeToReplacePostRector.php +++ b/packages/PostRector/Rector/NodeToReplacePostRector.php @@ -22,7 +22,10 @@ final class NodeToReplacePostRector extends \Rector\PostRector\Rector\AbstractPo { return 1100; } - public function leaveNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function leaveNode($node) : ?\PhpParser\Node { foreach ($this->nodesToReplaceCollector->getNodes() as [$nodeToFind, $replacement]) { if ($node === $nodeToFind) { diff --git a/packages/PostRector/Rector/PropertyAddingPostRector.php b/packages/PostRector/Rector/PropertyAddingPostRector.php index 2da552d0354..a8d9f2af037 100644 --- a/packages/PostRector/Rector/PropertyAddingPostRector.php +++ b/packages/PostRector/Rector/PropertyAddingPostRector.php @@ -54,7 +54,10 @@ final class PropertyAddingPostRector extends \Rector\PostRector\Rector\AbstractP { return 900; } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { if (!$node instanceof \PhpParser\Node\Stmt\Class_) { return null; diff --git a/packages/PostRector/Rector/UseAddingPostRector.php b/packages/PostRector/Rector/UseAddingPostRector.php index a62ccac4a01..6c307705514 100644 --- a/packages/PostRector/Rector/UseAddingPostRector.php +++ b/packages/PostRector/Rector/UseAddingPostRector.php @@ -67,7 +67,7 @@ final class UseAddingPostRector extends \Rector\PostRector\Rector\AbstractPostRe * @param Stmt[] $nodes * @return Stmt[] */ - public function beforeTraverse(array $nodes) : ?array + public function beforeTraverse($nodes) : ?array { // no nodes → just return if ($nodes === []) { diff --git a/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php index 0ea5d679219..b5870ec6309 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/AliasedObjectType.php @@ -52,7 +52,10 @@ final class AliasedObjectType extends \PHPStan\Type\ObjectType $use->type = \PhpParser\Node\Stmt\Use_::TYPE_FUNCTION; return $use; } - public function equals(\PHPStan\Type\Type $type) : bool + /** + * @param \PHPStan\Type\Type $type + */ + public function equals($type) : bool { // compare with FQN classes if ($type instanceof \PHPStan\Type\TypeWithClassName) { diff --git a/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php index 4f71b1cf612..5471ef4bb38 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/ShortenedGenericObjectType.php @@ -21,7 +21,10 @@ final class ShortenedGenericObjectType extends \PHPStan\Type\Generic\GenericObje $this->fullyQualifiedName = $fullyQualifiedName; parent::__construct($shortName, $types); } - public function isSuperTypeOf(\PHPStan\Type\Type $type) : \PHPStan\TrinaryLogic + /** + * @param \PHPStan\Type\Type $type + */ + public function isSuperTypeOf($type) : \PHPStan\TrinaryLogic { $genericObjectType = new \PHPStan\Type\Generic\GenericObjectType($this->fullyQualifiedName, $this->getTypes()); return $genericObjectType->isSuperTypeOf($type); diff --git a/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php b/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php index 6d6eb3382a7..8d5793ae6ba 100644 --- a/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php +++ b/packages/StaticTypeMapper/ValueObject/Type/ShortenedObjectType.php @@ -21,7 +21,10 @@ final class ShortenedObjectType extends \PHPStan\Type\ObjectType $this->fullyQualifiedName = $fullyQualifiedName; parent::__construct($shortName); } - public function isSuperTypeOf(\PHPStan\Type\Type $type) : \PHPStan\TrinaryLogic + /** + * @param \PHPStan\Type\Type $type + */ + public function isSuperTypeOf($type) : \PHPStan\TrinaryLogic { $fullyQualifiedObjectType = new \PHPStan\Type\ObjectType($this->fullyQualifiedName); return $fullyQualifiedObjectType->isSuperTypeOf($type); diff --git a/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php b/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php index a346ec70cd0..d92ea2c567c 100644 --- a/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php +++ b/rules/Arguments/Rector/ClassMethod/ArgumentAdderRector.php @@ -93,10 +93,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param MethodCall|StaticCall|ClassMethod $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Stmt\ClassMethod|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { $this->haveArgumentsChanged = \false; foreach ($this->addedArguments as $addedArgument) { @@ -116,7 +116,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $addedArguments = $configuration[self::ADDED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($addedArguments, \Rector\Arguments\ValueObject\ArgumentAdder::class); diff --git a/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php b/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php index d556c707842..ecdc6d3ff0b 100644 --- a/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php +++ b/rules/Arguments/Rector/ClassMethod/ReplaceArgumentDefaultValueRector.php @@ -57,10 +57,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param MethodCall|StaticCall|ClassMethod $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Stmt\ClassMethod */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { foreach ($this->replacedArguments as $replacedArgument) { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, $replacedArgument->getObjectType())) { @@ -76,7 +76,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $replacedArguments = $configuration[self::REPLACED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($replacedArguments); diff --git a/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php b/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php index d1b74ff9194..4699f9210c2 100644 --- a/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php +++ b/rules/Arguments/Rector/FuncCall/FunctionArgumentDefaultValueReplacerRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { foreach ($this->replacedArguments as $replacedArgument) { if (!$this->isName($node->name, $replacedArgument->getFunction())) { @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $replacedArguments = $configuration[self::REPLACED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($replacedArguments, \Rector\Arguments\ValueObject\ReplaceFuncCallArgumentDefaultValue::class); diff --git a/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php b/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php index adb1585aac4..a326d87ec08 100644 --- a/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php +++ b/rules/Arguments/Rector/FuncCall/SwapFuncCallArgumentsRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\FuncCall + public function refactor($node) : ?\PhpParser\Node\Expr\FuncCall { $isJustSwapped = (bool) $node->getAttribute(self::JUST_SWAPPED, \false); if ($isJustSwapped) { @@ -87,7 +87,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $functionArgumentSwaps = $configuration[self::FUNCTION_ARGUMENT_SWAPS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($functionArgumentSwaps, \Rector\Arguments\ValueObject\SwapFuncCallArguments::class); diff --git a/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php b/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php index 4dd7c080f3e..e400e2321b8 100644 --- a/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php +++ b/rules/Autodiscovery/Rector/Class_/MoveEntitiesToEntityDirectoryRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->doctrineDocBlockResolver->isDoctrineEntityClass($node)) { return null; diff --git a/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php b/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php index 49a752d6f4b..cd4cc8c9ca0 100644 --- a/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php +++ b/rules/Autodiscovery/Rector/Class_/MoveServicesBySuffixToDirectoryRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->processGroupNamesBySuffix($this->file->getSmartFileInfo(), $this->groupNamesBySuffix); return null; @@ -87,7 +87,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $groupNamesBySuffix = $configuration[self::GROUP_NAMES_BY_SUFFIX] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($groupNamesBySuffix); diff --git a/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php b/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php index 66ee436e2b4..4d9c8804cd9 100644 --- a/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php +++ b/rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php @@ -113,9 +113,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isValueObjectMatch($node)) { return null; @@ -132,7 +132,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $types = $configuration[self::TYPES] ?? []; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($types); diff --git a/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php b/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php index 1a0f6bcf369..79beabbba94 100644 --- a/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php +++ b/rules/Autodiscovery/Rector/Interface_/MoveInterfacesToContractNamespaceDirectoryRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Interface_::class]; } /** - * @param Interface_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->netteComponentFactoryInterfaceAnalyzer->isComponentFactoryInterface($node)) { return null; diff --git a/rules/CodeQuality/Rector/Array_/ArrayThisCallToThisMethodCallRector.php b/rules/CodeQuality/Rector/Array_/ArrayThisCallToThisMethodCallRector.php index def8e97c947..549cbe1afd5 100644 --- a/rules/CodeQuality/Rector/Array_/ArrayThisCallToThisMethodCallRector.php +++ b/rules/CodeQuality/Rector/Array_/ArrayThisCallToThisMethodCallRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $arrayCallable = $this->arrayCallableMethodMatcher->match($node); if (!$arrayCallable instanceof \Rector\NodeCollector\ValueObject\ArrayCallable) { diff --git a/rules/CodeQuality/Rector/Array_/CallableThisArrayToAnonymousFunctionRector.php b/rules/CodeQuality/Rector/Array_/CallableThisArrayToAnonymousFunctionRector.php index af5527cb355..f5949c31bba 100644 --- a/rules/CodeQuality/Rector/Array_/CallableThisArrayToAnonymousFunctionRector.php +++ b/rules/CodeQuality/Rector/Array_/CallableThisArrayToAnonymousFunctionRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $arrayCallable = $this->arrayCallableMethodMatcher->match($node); if (!$arrayCallable instanceof \Rector\NodeCollector\ValueObject\ArrayCallable) { diff --git a/rules/CodeQuality/Rector/Assign/CombinedAssignRector.php b/rules/CodeQuality/Rector/Assign/CombinedAssignRector.php index 95f7b3b5636..a12ee711ce2 100644 --- a/rules/CodeQuality/Rector/Assign/CombinedAssignRector.php +++ b/rules/CodeQuality/Rector/Assign/CombinedAssignRector.php @@ -36,9 +36,9 @@ final class CombinedAssignRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\BinaryOp) { return null; diff --git a/rules/CodeQuality/Rector/Assign/SplitListAssignToSeparateLineRector.php b/rules/CodeQuality/Rector/Assign/SplitListAssignToSeparateLineRector.php index 90c4540b280..838d5948f9c 100644 --- a/rules/CodeQuality/Rector/Assign/SplitListAssignToSeparateLineRector.php +++ b/rules/CodeQuality/Rector/Assign/SplitListAssignToSeparateLineRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/BooleanAnd/SimplifyEmptyArrayCheckRector.php b/rules/CodeQuality/Rector/BooleanAnd/SimplifyEmptyArrayCheckRector.php index 8404c22a697..37a5e7f6a3b 100644 --- a/rules/CodeQuality/Rector/BooleanAnd/SimplifyEmptyArrayCheckRector.php +++ b/rules/CodeQuality/Rector/BooleanAnd/SimplifyEmptyArrayCheckRector.php @@ -42,9 +42,9 @@ final class SimplifyEmptyArrayCheckRector extends \Rector\Core\Rector\AbstractRe return [\PhpParser\Node\Expr\BinaryOp\BooleanAnd::class]; } /** - * @param BooleanAnd $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $twoNodeMatch = $this->binaryOpManipulator->matchFirstAndSecondConditionNode( $node, diff --git a/rules/CodeQuality/Rector/BooleanNot/ReplaceMultipleBooleanNotRector.php b/rules/CodeQuality/Rector/BooleanNot/ReplaceMultipleBooleanNotRector.php index eac235a4dbb..49bdc52845f 100644 --- a/rules/CodeQuality/Rector/BooleanNot/ReplaceMultipleBooleanNotRector.php +++ b/rules/CodeQuality/Rector/BooleanNot/ReplaceMultipleBooleanNotRector.php @@ -32,9 +32,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $depth = 0; $expr = $node->expr; diff --git a/rules/CodeQuality/Rector/BooleanNot/SimplifyDeMorganBinaryRector.php b/rules/CodeQuality/Rector/BooleanNot/SimplifyDeMorganBinaryRector.php index 1b4e707f8f5..db88f994755 100644 --- a/rules/CodeQuality/Rector/BooleanNot/SimplifyDeMorganBinaryRector.php +++ b/rules/CodeQuality/Rector/BooleanNot/SimplifyDeMorganBinaryRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\BinaryOp\BooleanOr) { return null; diff --git a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php index e0719dec917..ad8f381e766 100644 --- a/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php +++ b/rules/CodeQuality/Rector/Catch_/ThrowWithPreviousExceptionRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Catch_::class]; } /** - * @param Catch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $caughtThrowableVariable = $node->var; if (!$caughtThrowableVariable instanceof \PhpParser\Node\Expr\Variable) { diff --git a/rules/CodeQuality/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php b/rules/CodeQuality/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php index 1faacf21aa9..915c8738807 100644 --- a/rules/CodeQuality/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/DateTimeToDateTimeInterfaceRector.php @@ -103,9 +103,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Property::class]; } /** - * @param ClassMethod|Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassMethod) { return $this->refactorClassMethod($node); diff --git a/rules/CodeQuality/Rector/ClassMethod/NarrowUnionTypeDocRector.php b/rules/CodeQuality/Rector/ClassMethod/NarrowUnionTypeDocRector.php index 74c9cffeba0..e504a030f8e 100644 --- a/rules/CodeQuality/Rector/ClassMethod/NarrowUnionTypeDocRector.php +++ b/rules/CodeQuality/Rector/ClassMethod/NarrowUnionTypeDocRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $params = $node->getParams(); diff --git a/rules/CodeQuality/Rector/Class_/CompleteDynamicPropertiesRector.php b/rules/CodeQuality/Rector/Class_/CompleteDynamicPropertiesRector.php index 8a69b05ae4f..4ee83a7ef15 100644 --- a/rules/CodeQuality/Rector/Class_/CompleteDynamicPropertiesRector.php +++ b/rules/CodeQuality/Rector/Class_/CompleteDynamicPropertiesRector.php @@ -101,9 +101,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClass($node)) { return null; diff --git a/rules/CodeQuality/Rector/Concat/JoinStringConcatRector.php b/rules/CodeQuality/Rector/Concat/JoinStringConcatRector.php index 2b34add7034..7bdfe3e5da6 100644 --- a/rules/CodeQuality/Rector/Concat/JoinStringConcatRector.php +++ b/rules/CodeQuality/Rector/Concat/JoinStringConcatRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Concat::class]; } /** - * @param Concat $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->nodeReplacementIsRestricted = \false; if (!$this->isTopMostConcatNode($node)) { diff --git a/rules/CodeQuality/Rector/Do_/DoWhileBreakFalseToIfElseRector.php b/rules/CodeQuality/Rector/Do_/DoWhileBreakFalseToIfElseRector.php index c4beba3995e..485c0ad95d7 100644 --- a/rules/CodeQuality/Rector/Do_/DoWhileBreakFalseToIfElseRector.php +++ b/rules/CodeQuality/Rector/Do_/DoWhileBreakFalseToIfElseRector.php @@ -47,10 +47,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Do_::class]; } /** - * @param Do_ $node + * @param \PhpParser\Node $node * @return mixed[]|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if (!$this->valueResolver->isFalse($node->cond)) { return null; diff --git a/rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php b/rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php index 7c34fea180d..ea0d067265c 100644 --- a/rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php +++ b/rules/CodeQuality/Rector/Equal/UseIdenticalOverEqualWithSameTypeRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Equal::class, \PhpParser\Node\Expr\BinaryOp\NotEqual::class]; } /** - * @param Equal|NotEqual $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $leftStaticType = $this->getType($node->left); $rightStaticType = $this->getType($node->right); diff --git a/rules/CodeQuality/Rector/Expression/InlineIfToExplicitIfRector.php b/rules/CodeQuality/Rector/Expression/InlineIfToExplicitIfRector.php index d8b2fdc40af..0aa5945b04c 100644 --- a/rules/CodeQuality/Rector/Expression/InlineIfToExplicitIfRector.php +++ b/rules/CodeQuality/Rector/Expression/InlineIfToExplicitIfRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Expression::class]; } /** - * @param Expression $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->expr instanceof \PhpParser\Node\Expr\BinaryOp\BooleanAnd) { return $this->processExplicitIf($node); diff --git a/rules/CodeQuality/Rector/For_/ForRepeatedCountToOwnVariableRector.php b/rules/CodeQuality/Rector/For_/ForRepeatedCountToOwnVariableRector.php index abb15e9a75b..cd22109e52e 100644 --- a/rules/CodeQuality/Rector/For_/ForRepeatedCountToOwnVariableRector.php +++ b/rules/CodeQuality/Rector/For_/ForRepeatedCountToOwnVariableRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\For_::class]; } /** - * @param For_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $countInCond = null; $variableName = null; diff --git a/rules/CodeQuality/Rector/For_/ForToForeachRector.php b/rules/CodeQuality/Rector/For_/ForToForeachRector.php index c9bbf38cb14..71bdc3018c7 100644 --- a/rules/CodeQuality/Rector/For_/ForToForeachRector.php +++ b/rules/CodeQuality/Rector/For_/ForToForeachRector.php @@ -109,9 +109,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\For_::class]; } /** - * @param For_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->reset(); $this->matchInit($node->init); diff --git a/rules/CodeQuality/Rector/Foreach_/ForeachItemsAssignToEmptyArrayToAssignRector.php b/rules/CodeQuality/Rector/Foreach_/ForeachItemsAssignToEmptyArrayToAssignRector.php index fcff08479b0..c2ec4e3c258 100644 --- a/rules/CodeQuality/Rector/Foreach_/ForeachItemsAssignToEmptyArrayToAssignRector.php +++ b/rules/CodeQuality/Rector/Foreach_/ForeachItemsAssignToEmptyArrayToAssignRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/Foreach_/ForeachToInArrayRector.php b/rules/CodeQuality/Rector/Foreach_/ForeachToInArrayRector.php index 3ab6941888c..8f197116e9e 100644 --- a/rules/CodeQuality/Rector/Foreach_/ForeachToInArrayRector.php +++ b/rules/CodeQuality/Rector/Foreach_/ForeachToInArrayRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipForeach($node)) { return null; diff --git a/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToArrayFilterRector.php b/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToArrayFilterRector.php index 1efa00d1d8f..a88bf305167 100644 --- a/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToArrayFilterRector.php +++ b/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToArrayFilterRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToCoalescingRector.php b/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToCoalescingRector.php index 9410b40365c..bdde94ed25c 100644 --- a/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToCoalescingRector.php +++ b/rules/CodeQuality/Rector/Foreach_/SimplifyForeachToCoalescingRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->return = null; if ($node->keyVar === null) { diff --git a/rules/CodeQuality/Rector/Foreach_/UnusedForeachValueToArrayKeysRector.php b/rules/CodeQuality/Rector/Foreach_/UnusedForeachValueToArrayKeysRector.php index d84eeef6397..7f8f9f2bea3 100644 --- a/rules/CodeQuality/Rector/Foreach_/UnusedForeachValueToArrayKeysRector.php +++ b/rules/CodeQuality/Rector/Foreach_/UnusedForeachValueToArrayKeysRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->keyVar === null) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/AddPregQuoteDelimiterRector.php b/rules/CodeQuality/Rector/FuncCall/AddPregQuoteDelimiterRector.php index e62aec8d538..2ce490cbf7f 100644 --- a/rules/CodeQuality/Rector/FuncCall/AddPregQuoteDelimiterRector.php +++ b/rules/CodeQuality/Rector/FuncCall/AddPregQuoteDelimiterRector.php @@ -41,9 +41,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'preg_quote')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php b/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php index dcad2c154c4..1ffe64b6310 100644 --- a/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ArrayKeysAndInArrayToArrayKeyExistsRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeNameResolver->isName($node, 'in_array')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php b/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php index 7aa860986c8..e04b9fe27dc 100644 --- a/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ArrayMergeOfNonArraysToSimpleArrayRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'array_merge')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php index 7cea5554cb0..e1507958376 100644 --- a/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php +++ b/rules/CodeQuality/Rector/FuncCall/CallUserFuncWithArrowFunctionToInlineRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'call_user_func')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php b/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php index e80ad3a4062..62a369b103d 100644 --- a/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php +++ b/rules/CodeQuality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'array_push')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php b/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php index 5ecc9a6f026..365adad96f5 100644 --- a/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php +++ b/rules/CodeQuality/Rector/FuncCall/CompactToVariablesRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'compact')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php b/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php index b14e5c18333..9aa71167911 100644 --- a/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php +++ b/rules/CodeQuality/Rector/FuncCall/InArrayAndArrayKeysToArrayKeyExistsRector.php @@ -37,9 +37,9 @@ final class InArrayAndArrayKeysToArrayKeyExistsRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'in_array')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php b/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php index 269f9802b54..5784a9123bf 100644 --- a/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/IntvalToTypeCastRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'intval')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php index 33e520cad01..bd0ecb9c335 100644 --- a/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php +++ b/rules/CodeQuality/Rector/FuncCall/IsAWithStringWithThirdArgumentRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'is_a')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php index f758823aa0c..bb4732a0d7c 100644 --- a/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php +++ b/rules/CodeQuality/Rector/FuncCall/RemoveSoleValueSprintfRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'sprintf')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php b/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php index f988438887a..93d77fc6e01 100644 --- a/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SetTypeToCastRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'settype')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php index e6ec4f7422b..ee891dcd60b 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyFuncGetArgsCountRector.php @@ -26,9 +26,9 @@ final class SimplifyFuncGetArgsCountRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'count')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php index a3c42e308af..f2761f97e48 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyInArrayValuesRector.php @@ -26,9 +26,9 @@ final class SimplifyInArrayValuesRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'in_array')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index bc8792d1382..17a1fcc789e 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $patterns = $this->regexPatternArgumentManipulator->matchCallArgumentWithRegexPattern($node); if ($patterns === []) { diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php index 6201d730742..69766e8c576 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyStrposLowerRector.php @@ -27,9 +27,9 @@ final class SimplifyStrposLowerRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'strpos')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php index 7d67f79ccff..61f875a5f97 100644 --- a/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SingleInArrayToCompareRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'in_array')) { return null; diff --git a/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php b/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php index 7ab863b7048..f689b38ab30 100644 --- a/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php +++ b/rules/CodeQuality/Rector/FuncCall/UnwrapSprintfOneArgumentRector.php @@ -43,9 +43,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'sprintf')) { return null; diff --git a/rules/CodeQuality/Rector/FunctionLike/RemoveAlwaysTrueConditionSetInConstructorRector.php b/rules/CodeQuality/Rector/FunctionLike/RemoveAlwaysTrueConditionSetInConstructorRector.php index c628962fcd2..4fc8f1b4a07 100644 --- a/rules/CodeQuality/Rector/FunctionLike/RemoveAlwaysTrueConditionSetInConstructorRector.php +++ b/rules/CodeQuality/Rector/FunctionLike/RemoveAlwaysTrueConditionSetInConstructorRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->stmts === null) { return null; diff --git a/rules/CodeQuality/Rector/Identical/BooleanNotIdenticalToNotIdenticalRector.php b/rules/CodeQuality/Rector/Identical/BooleanNotIdenticalToNotIdenticalRector.php index 7fb6478810e..bf7a9db4c5c 100644 --- a/rules/CodeQuality/Rector/Identical/BooleanNotIdenticalToNotIdenticalRector.php +++ b/rules/CodeQuality/Rector/Identical/BooleanNotIdenticalToNotIdenticalRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param Identical|BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return $this->processIdentical($node); diff --git a/rules/CodeQuality/Rector/Identical/FlipTypeControlToUseExclusiveTypeRector.php b/rules/CodeQuality/Rector/Identical/FlipTypeControlToUseExclusiveTypeRector.php index d73d256a806..cc856640335 100644 --- a/rules/CodeQuality/Rector/Identical/FlipTypeControlToUseExclusiveTypeRector.php +++ b/rules/CodeQuality/Rector/Identical/FlipTypeControlToUseExclusiveTypeRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class]; } /** - * @param Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->valueResolver->isNull($node->left) && !$this->valueResolver->isNull($node->right)) { return null; diff --git a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php index 92c87a8bc3d..9070da85fd6 100644 --- a/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php +++ b/rules/CodeQuality/Rector/Identical/GetClassToInstanceOfRector.php @@ -49,9 +49,9 @@ final class GetClassToInstanceOfRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $twoNodeMatch = $this->binaryOpManipulator->matchFirstAndSecondConditionNode($node, function (\PhpParser\Node $node) : bool { return $this->isClassReference($node); diff --git a/rules/CodeQuality/Rector/Identical/SimplifyArraySearchRector.php b/rules/CodeQuality/Rector/Identical/SimplifyArraySearchRector.php index 0e151ab06da..d59f357a107 100644 --- a/rules/CodeQuality/Rector/Identical/SimplifyArraySearchRector.php +++ b/rules/CodeQuality/Rector/Identical/SimplifyArraySearchRector.php @@ -39,9 +39,9 @@ final class SimplifyArraySearchRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $twoNodeMatch = $this->binaryOpManipulator->matchFirstAndSecondConditionNode($node, function (\PhpParser\Node $node) : bool { if (!$node instanceof \PhpParser\Node\Expr\FuncCall) { diff --git a/rules/CodeQuality/Rector/Identical/SimplifyBoolIdenticalTrueRector.php b/rules/CodeQuality/Rector/Identical/SimplifyBoolIdenticalTrueRector.php index 40873e8477a..fae3adc040e 100644 --- a/rules/CodeQuality/Rector/Identical/SimplifyBoolIdenticalTrueRector.php +++ b/rules/CodeQuality/Rector/Identical/SimplifyBoolIdenticalTrueRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $leftType = $this->getType($node->left); if ($leftType instanceof \PHPStan\Type\BooleanType && !$this->valueResolver->isTrueOrFalse($node->left)) { diff --git a/rules/CodeQuality/Rector/Identical/SimplifyConditionsRector.php b/rules/CodeQuality/Rector/Identical/SimplifyConditionsRector.php index d0a8bfb52e7..246f86c55ba 100644 --- a/rules/CodeQuality/Rector/Identical/SimplifyConditionsRector.php +++ b/rules/CodeQuality/Rector/Identical/SimplifyConditionsRector.php @@ -47,9 +47,9 @@ final class SimplifyConditionsRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\BooleanNot::class, \PhpParser\Node\Expr\BinaryOp\Identical::class]; } /** - * @param BooleanNot|Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BooleanNot) { return $this->processBooleanNot($node); diff --git a/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php b/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php index a96c23af00a..9dc53689bc4 100644 --- a/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php +++ b/rules/CodeQuality/Rector/Identical/StrlenZeroToIdenticalEmptyStringRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class]; } /** - * @param Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->left instanceof \PhpParser\Node\Expr\FuncCall) { return $this->processIdentical($node->right, $node->left); diff --git a/rules/CodeQuality/Rector/If_/CombineIfRector.php b/rules/CodeQuality/Rector/If_/CombineIfRector.php index 5fc417244fd..a539eb2754b 100644 --- a/rules/CodeQuality/Rector/If_/CombineIfRector.php +++ b/rules/CodeQuality/Rector/If_/CombineIfRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/If_/ConsecutiveNullCompareReturnsToNullCoalesceQueueRector.php b/rules/CodeQuality/Rector/If_/ConsecutiveNullCompareReturnsToNullCoalesceQueueRector.php index 454e3fe52c7..e8dc650cc17 100644 --- a/rules/CodeQuality/Rector/If_/ConsecutiveNullCompareReturnsToNullCoalesceQueueRector.php +++ b/rules/CodeQuality/Rector/If_/ConsecutiveNullCompareReturnsToNullCoalesceQueueRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->reset(); $currentNode = $node; diff --git a/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php b/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php index 696deb59122..cd1c9c2d568 100644 --- a/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php +++ b/rules/CodeQuality/Rector/If_/ExplicitBoolCompareRector.php @@ -93,9 +93,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class, \PhpParser\Node\Stmt\ElseIf_::class, \PhpParser\Node\Expr\Ternary::class]; } /** - * @param If_|ElseIf_|Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // skip short ternary if ($node instanceof \PhpParser\Node\Expr\Ternary && $node->if === null) { diff --git a/rules/CodeQuality/Rector/If_/ShortenElseIfRector.php b/rules/CodeQuality/Rector/If_/ShortenElseIfRector.php index 773cde3a849..4add26ffff7 100644 --- a/rules/CodeQuality/Rector/If_/ShortenElseIfRector.php +++ b/rules/CodeQuality/Rector/If_/ShortenElseIfRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->shortenElseIf($node); } diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfElseToTernaryRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfElseToTernaryRector.php index 01ada10e773..54fccf233cd 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfElseToTernaryRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfElseToTernaryRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->else === null) { return null; diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php index a46e5ab91e5..286698e0ff1 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfIssetToNullCoalescingRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfNotNullReturnRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfNotNullReturnRector.php index 050a33cce09..ad71de7a791 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfNotNullReturnRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfNotNullReturnRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $comparedNode = $this->ifManipulator->matchIfNotNullReturnValue($node); if ($comparedNode !== null) { diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfNullableReturnRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfNullableReturnRector.php index 398633768fa..1d9d56bcd92 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfNullableReturnRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfNullableReturnRector.php @@ -86,9 +86,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/If_/SimplifyIfReturnBoolRector.php b/rules/CodeQuality/Rector/If_/SimplifyIfReturnBoolRector.php index 4f3ee630f77..608c0986b4b 100644 --- a/rules/CodeQuality/Rector/If_/SimplifyIfReturnBoolRector.php +++ b/rules/CodeQuality/Rector/If_/SimplifyIfReturnBoolRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/Include_/AbsolutizeRequireAndIncludePathRector.php b/rules/CodeQuality/Rector/Include_/AbsolutizeRequireAndIncludePathRector.php index 1b5bc558515..3648da14db6 100644 --- a/rules/CodeQuality/Rector/Include_/AbsolutizeRequireAndIncludePathRector.php +++ b/rules/CodeQuality/Rector/Include_/AbsolutizeRequireAndIncludePathRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Include_::class]; } /** - * @param Include_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Scalar\String_) { return null; diff --git a/rules/CodeQuality/Rector/Isset_/IssetOnPropertyObjectToPropertyExistsRector.php b/rules/CodeQuality/Rector/Isset_/IssetOnPropertyObjectToPropertyExistsRector.php index e4bdb261692..06006fafd91 100644 --- a/rules/CodeQuality/Rector/Isset_/IssetOnPropertyObjectToPropertyExistsRector.php +++ b/rules/CodeQuality/Rector/Isset_/IssetOnPropertyObjectToPropertyExistsRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Isset_::class]; } /** - * @param Isset_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $newNodes = []; foreach ($node->vars as $issetVar) { diff --git a/rules/CodeQuality/Rector/LogicalAnd/AndAssignsToSeparateLinesRector.php b/rules/CodeQuality/Rector/LogicalAnd/AndAssignsToSeparateLinesRector.php index a954c6b4bed..d12b100231e 100644 --- a/rules/CodeQuality/Rector/LogicalAnd/AndAssignsToSeparateLinesRector.php +++ b/rules/CodeQuality/Rector/LogicalAnd/AndAssignsToSeparateLinesRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\LogicalAnd::class]; } /** - * @param LogicalAnd $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->left instanceof \PhpParser\Node\Expr\Assign) { return null; diff --git a/rules/CodeQuality/Rector/LogicalAnd/LogicalToBooleanRector.php b/rules/CodeQuality/Rector/LogicalAnd/LogicalToBooleanRector.php index 350799f3e1c..86827a872ec 100644 --- a/rules/CodeQuality/Rector/LogicalAnd/LogicalToBooleanRector.php +++ b/rules/CodeQuality/Rector/LogicalAnd/LogicalToBooleanRector.php @@ -40,9 +40,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\LogicalOr::class, \PhpParser\Node\Expr\BinaryOp\LogicalAnd::class]; } /** - * @param LogicalOr|LogicalAnd $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->refactorLogicalToBoolean($node); } diff --git a/rules/CodeQuality/Rector/New_/NewStaticToNewSelfRector.php b/rules/CodeQuality/Rector/New_/NewStaticToNewSelfRector.php index 6ad4a571c90..3e751ee2e9d 100644 --- a/rules/CodeQuality/Rector/New_/NewStaticToNewSelfRector.php +++ b/rules/CodeQuality/Rector/New_/NewStaticToNewSelfRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $class = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$class instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/CodeQuality/Rector/NotEqual/CommonNotEqualRector.php b/rules/CodeQuality/Rector/NotEqual/CommonNotEqualRector.php index bb35ea7d81e..6bb6805c1bf 100644 --- a/rules/CodeQuality/Rector/NotEqual/CommonNotEqualRector.php +++ b/rules/CodeQuality/Rector/NotEqual/CommonNotEqualRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\NotEqual::class]; } /** - * @param NotEqual $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\BinaryOp\NotEqual + public function refactor($node) : \PhpParser\Node\Expr\BinaryOp\NotEqual { // invoke override to default "!=" $node->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NODE, null); diff --git a/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php b/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php index 0a293dcb40f..3c5ba157f8a 100644 --- a/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php +++ b/rules/CodeQuality/Rector/PropertyFetch/ExplicitMethodCallOverMagicGetSetRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\PropertyFetch::class, \PhpParser\Node\Expr\Assign::class]; } /** - * @param PropertyFetch|Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\Assign) { if ($node->var instanceof \PhpParser\Node\Expr\PropertyFetch) { diff --git a/rules/CodeQuality/Rector/Return_/SimplifyUselessVariableRector.php b/rules/CodeQuality/Rector/Return_/SimplifyUselessVariableRector.php index ba763701b36..fc361f56b4d 100644 --- a/rules/CodeQuality/Rector/Return_/SimplifyUselessVariableRector.php +++ b/rules/CodeQuality/Rector/Return_/SimplifyUselessVariableRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/CodeQuality/Rector/Switch_/SingularSwitchToIfRector.php b/rules/CodeQuality/Rector/Switch_/SingularSwitchToIfRector.php index 381e1c84b39..b614a4100f7 100644 --- a/rules/CodeQuality/Rector/Switch_/SingularSwitchToIfRector.php +++ b/rules/CodeQuality/Rector/Switch_/SingularSwitchToIfRector.php @@ -66,10 +66,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node * @return Node\Stmt[]|If_|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if (\count($node->cases) !== 1) { return null; diff --git a/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php b/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php index 5929c5e9f1f..d473cf6a3b1 100644 --- a/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php +++ b/rules/CodeQuality/Rector/Ternary/ArrayKeyExistsTernaryThenValueToCoalescingRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->cond instanceof \PhpParser\Node\Expr\FuncCall) { return null; diff --git a/rules/CodeQuality/Rector/Ternary/SimplifyDuplicatedTernaryRector.php b/rules/CodeQuality/Rector/Ternary/SimplifyDuplicatedTernaryRector.php index d91fab42cf8..6869fb913bb 100644 --- a/rules/CodeQuality/Rector/Ternary/SimplifyDuplicatedTernaryRector.php +++ b/rules/CodeQuality/Rector/Ternary/SimplifyDuplicatedTernaryRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $condType = $this->getType($node->cond); if (!$condType instanceof \PHPStan\Type\BooleanType) { diff --git a/rules/CodeQuality/Rector/Ternary/SimplifyTautologyTernaryRector.php b/rules/CodeQuality/Rector/Ternary/SimplifyTautologyTernaryRector.php index 8e2c49f36a4..e5f5f2485ca 100644 --- a/rules/CodeQuality/Rector/Ternary/SimplifyTautologyTernaryRector.php +++ b/rules/CodeQuality/Rector/Ternary/SimplifyTautologyTernaryRector.php @@ -38,9 +38,9 @@ final class SimplifyTautologyTernaryRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->cond instanceof \PhpParser\Node\Expr\BinaryOp\NotIdentical && !$node->cond instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return null; diff --git a/rules/CodeQuality/Rector/Ternary/SwitchNegatedTernaryRector.php b/rules/CodeQuality/Rector/Ternary/SwitchNegatedTernaryRector.php index c0427337311..2c277a90965 100644 --- a/rules/CodeQuality/Rector/Ternary/SwitchNegatedTernaryRector.php +++ b/rules/CodeQuality/Rector/Ternary/SwitchNegatedTernaryRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->cond instanceof \PhpParser\Node\Expr\BooleanNot) { return null; diff --git a/rules/CodeQuality/Rector/Ternary/UnnecessaryTernaryExpressionRector.php b/rules/CodeQuality/Rector/Ternary/UnnecessaryTernaryExpressionRector.php index 84d02ad5c1d..497dc4a7f99 100644 --- a/rules/CodeQuality/Rector/Ternary/UnnecessaryTernaryExpressionRector.php +++ b/rules/CodeQuality/Rector/Ternary/UnnecessaryTernaryExpressionRector.php @@ -40,9 +40,9 @@ final class UnnecessaryTernaryExpressionRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Ternary $ternaryExpression */ $ternaryExpression = $node; diff --git a/rules/CodingStyle/Rector/Assign/PHPStormVarAnnotationRector.php b/rules/CodingStyle/Rector/Assign/PHPStormVarAnnotationRector.php index 02690bea606..e5ee70e39e6 100644 --- a/rules/CodingStyle/Rector/Assign/PHPStormVarAnnotationRector.php +++ b/rules/CodingStyle/Rector/Assign/PHPStormVarAnnotationRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $expression = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CURRENT_STATEMENT); // unable to analyze diff --git a/rules/CodingStyle/Rector/Assign/SplitDoubleAssignRector.php b/rules/CodingStyle/Rector/Assign/SplitDoubleAssignRector.php index ed9d9911e58..3e929a37173 100644 --- a/rules/CodingStyle/Rector/Assign/SplitDoubleAssignRector.php +++ b/rules/CodingStyle/Rector/Assign/SplitDoubleAssignRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node\Stmt\Expression) { diff --git a/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php b/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php index 93d16902aac..635e513d3cf 100644 --- a/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php +++ b/rules/CodingStyle/Rector/Catch_/CatchExceptionNameMatchingTypeRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Catch_::class]; } /** - * @param Catch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->types) !== 1) { return null; diff --git a/rules/CodingStyle/Rector/ClassConst/SplitGroupedConstantsAndPropertiesRector.php b/rules/CodingStyle/Rector/ClassConst/SplitGroupedConstantsAndPropertiesRector.php index e1b22423235..7cdc0752a55 100644 --- a/rules/CodingStyle/Rector/ClassConst/SplitGroupedConstantsAndPropertiesRector.php +++ b/rules/CodingStyle/Rector/ClassConst/SplitGroupedConstantsAndPropertiesRector.php @@ -56,10 +56,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class, \PhpParser\Node\Stmt\Property::class]; } /** - * @param ClassConst|Property $node + * @param \PhpParser\Node $node * @return Node[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($node instanceof \PhpParser\Node\Stmt\ClassConst) { if (\count($node->consts) < 2) { diff --git a/rules/CodingStyle/Rector/ClassConst/VarConstantCommentRector.php b/rules/CodingStyle/Rector/ClassConst/VarConstantCommentRector.php index 1a3aea42be3..635c84867d5 100644 --- a/rules/CodingStyle/Rector/ClassConst/VarConstantCommentRector.php +++ b/rules/CodingStyle/Rector/ClassConst/VarConstantCommentRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->consts) > 1) { return null; diff --git a/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php b/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php index 016e8f6090d..b521642cd49 100644 --- a/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/FuncGetArgsToVariadicParamRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->params !== []) { return null; diff --git a/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php b/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php index 29c98e734ce..95fa938d1e5 100644 --- a/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/MakeInheritedMethodVisibilitySameAsParentRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->isMagic()) { return null; diff --git a/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php b/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php index 8f327101e08..d4fad40909e 100644 --- a/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // skip methods with no bodies (e.g interface methods) if ($node->stmts === null) { diff --git a/rules/CodingStyle/Rector/ClassMethod/OrderAttributesRector.php b/rules/CodingStyle/Rector/ClassMethod/OrderAttributesRector.php index 19cff705063..ce2c38b67fe 100644 --- a/rules/CodingStyle/Rector/ClassMethod/OrderAttributesRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/OrderAttributesRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Param::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param ClassMethod|Property|Function_|Closure|Param|Class_|ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->attrGroups === []) { return null; @@ -80,7 +80,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $attributesOrder = $configuration[self::ATTRIBUTES_ORDER] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($attributesOrder); diff --git a/rules/CodingStyle/Rector/ClassMethod/RemoveDoubleUnderscoreInMethodNameRector.php b/rules/CodingStyle/Rector/ClassMethod/RemoveDoubleUnderscoreInMethodNameRector.php index a9b45b6faa2..25bb3b6d00b 100644 --- a/rules/CodingStyle/Rector/ClassMethod/RemoveDoubleUnderscoreInMethodNameRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/RemoveDoubleUnderscoreInMethodNameRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param ClassMethod|MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $methodName = $this->getName($node->name); if ($methodName === null) { diff --git a/rules/CodingStyle/Rector/ClassMethod/ReturnArrayClassMethodToYieldRector.php b/rules/CodingStyle/Rector/ClassMethod/ReturnArrayClassMethodToYieldRector.php index e4c0863b40a..b60d2a8503a 100644 --- a/rules/CodingStyle/Rector/ClassMethod/ReturnArrayClassMethodToYieldRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/ReturnArrayClassMethodToYieldRector.php @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $hasChanged = \false; foreach ($this->methodsToYields as $methodToYield) { @@ -113,7 +113,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodsToYields = $configuration[self::METHODS_TO_YIELDS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($methodsToYields, \Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield::class); diff --git a/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php b/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php index 884c170ee64..dffd44231ac 100644 --- a/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php +++ b/rules/CodingStyle/Rector/ClassMethod/UnSpreadOperatorRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param ClassMethod|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassMethod) { return $this->refactorClassMethod($node); diff --git a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php index 872fbd5a948..6310d468962 100644 --- a/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php +++ b/rules/CodingStyle/Rector/Class_/AddArrayDefaultToArrayPropertyRector.php @@ -90,9 +90,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $changedProperties = $this->collectPropertyNamesWithMissingDefaultArray($node); if ($changedProperties === []) { diff --git a/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php b/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php index eafde2fdf5a..a5b5f4ab4db 100644 --- a/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php +++ b/rules/CodingStyle/Rector/Encapsed/EncapsedStringsToSprintfRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\Encapsed::class]; } /** - * @param Encapsed $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->sprintfFormat = ''; $this->argumentVariables = []; diff --git a/rules/CodingStyle/Rector/Encapsed/WrapEncapsedVariableInCurlyBracesRector.php b/rules/CodingStyle/Rector/Encapsed/WrapEncapsedVariableInCurlyBracesRector.php index 23411b95aff..504af68832e 100644 --- a/rules/CodingStyle/Rector/Encapsed/WrapEncapsedVariableInCurlyBracesRector.php +++ b/rules/CodingStyle/Rector/Encapsed/WrapEncapsedVariableInCurlyBracesRector.php @@ -39,9 +39,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\Encapsed::class]; } /** - * @param Encapsed $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $startTokenPos = $node->getStartTokenPos(); $hasVariableBeenWrapped = \false; diff --git a/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php b/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php index 6d1b36c1a0d..4c437ed839a 100644 --- a/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CallUserFuncArrayToVariadicRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'call_user_func_array')) { return null; diff --git a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php index c1683e3c084..6ff4e5bee01 100644 --- a/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CallUserFuncToMethodCallRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'call_user_func')) { return null; diff --git a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php index b30ff46b469..c180be07d41 100644 --- a/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php +++ b/rules/CodingStyle/Rector/FuncCall/ConsistentImplodeRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'implode')) { return null; diff --git a/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php b/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php index 678ab08c572..51e5637b3ac 100644 --- a/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php +++ b/rules/CodingStyle/Rector/FuncCall/ConsistentPregDelimiterRector.php @@ -84,9 +84,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\FuncCall) { return $this->refactorFuncCall($node); @@ -108,7 +108,10 @@ CODE_SAMPLE } return null; } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { $this->delimiter = $configuration[self::DELIMITER] ?? '#'; } diff --git a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php index f2ad9266065..4d4e61eb8c9 100644 --- a/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php +++ b/rules/CodingStyle/Rector/FuncCall/CountArrayToEmptyArrayComparisonRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param FuncCall|BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BooleanNot) { return $this->processMarkTruthyNegation($node); diff --git a/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php b/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php index ca2dbb3be07..c1c392e0ab6 100644 --- a/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php +++ b/rules/CodingStyle/Rector/FuncCall/StrictArraySearchRector.php @@ -25,9 +25,9 @@ final class StrictArraySearchRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'array_search')) { return null; diff --git a/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php b/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php index fe1f786f785..7caa9ba086a 100644 --- a/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php +++ b/rules/CodingStyle/Rector/FuncCall/VersionCompareFuncCallToConstantRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'version_compare')) { return null; diff --git a/rules/CodingStyle/Rector/If_/NullableCompareToNullRector.php b/rules/CodingStyle/Rector/If_/NullableCompareToNullRector.php index 455f2f7c035..091f93f41e0 100644 --- a/rules/CodingStyle/Rector/If_/NullableCompareToNullRector.php +++ b/rules/CodingStyle/Rector/If_/NullableCompareToNullRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->cond instanceof \PhpParser\Node\Expr\BooleanNot && $this->isNullableNonScalarType($node->cond->expr)) { $node->cond = new \PhpParser\Node\Expr\BinaryOp\Identical($node->cond->expr, $this->nodeFactory->createNull()); diff --git a/rules/CodingStyle/Rector/Include_/FollowRequireByDirRector.php b/rules/CodingStyle/Rector/Include_/FollowRequireByDirRector.php index 779062cdc5c..a098d0e6d48 100644 --- a/rules/CodingStyle/Rector/Include_/FollowRequireByDirRector.php +++ b/rules/CodingStyle/Rector/Include_/FollowRequireByDirRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Include_::class]; } /** - * @param Include_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->expr instanceof \PhpParser\Node\Expr\BinaryOp\Concat && $node->expr->left instanceof \PhpParser\Node\Scalar\String_ && $this->isRefactorableStringPath($node->expr->left)) { $node->expr->left = $this->prefixWithDir($node->expr->left); diff --git a/rules/CodingStyle/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php b/rules/CodingStyle/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php index 43ac8b42492..f48f57b587b 100644 --- a/rules/CodingStyle/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php +++ b/rules/CodingStyle/Rector/MethodCall/PreferThisOrSelfMethodCallRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->typeToPreference as $type => $preference) { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType($type))) { @@ -89,7 +89,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $typeToPreference = $configuration[self::TYPE_TO_PREFERENCE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($typeToPreference); diff --git a/rules/CodingStyle/Rector/Plus/UseIncrementAssignRector.php b/rules/CodingStyle/Rector/Plus/UseIncrementAssignRector.php index 3dd3a46ed41..506d52b7d5f 100644 --- a/rules/CodingStyle/Rector/Plus/UseIncrementAssignRector.php +++ b/rules/CodingStyle/Rector/Plus/UseIncrementAssignRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\AssignOp\Plus::class, \PhpParser\Node\Expr\AssignOp\Minus::class]; } /** - * @param Plus|Minus $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Scalar\LNumber) { return null; diff --git a/rules/CodingStyle/Rector/PostInc/PostIncDecToPreIncDecRector.php b/rules/CodingStyle/Rector/PostInc/PostIncDecToPreIncDecRector.php index 3bfc8a5677b..e630ad0be13 100644 --- a/rules/CodingStyle/Rector/PostInc/PostIncDecToPreIncDecRector.php +++ b/rules/CodingStyle/Rector/PostInc/PostIncDecToPreIncDecRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\PostInc::class, \PhpParser\Node\Expr\PostDec::class]; } /** - * @param PostInc|PostDec $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if ($this->isAnExpression($parentNode)) { diff --git a/rules/CodingStyle/Rector/Property/AddFalseDefaultToBoolPropertyRector.php b/rules/CodingStyle/Rector/Property/AddFalseDefaultToBoolPropertyRector.php index 5fe3f1bcb53..514a926be98 100644 --- a/rules/CodingStyle/Rector/Property/AddFalseDefaultToBoolPropertyRector.php +++ b/rules/CodingStyle/Rector/Property/AddFalseDefaultToBoolPropertyRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->props) !== 1) { return null; diff --git a/rules/CodingStyle/Rector/Stmt/NewlineAfterStatementRector.php b/rules/CodingStyle/Rector/Stmt/NewlineAfterStatementRector.php index 0976ba2cb00..65fa67155fd 100644 --- a/rules/CodingStyle/Rector/Stmt/NewlineAfterStatementRector.php +++ b/rules/CodingStyle/Rector/Stmt/NewlineAfterStatementRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt::class]; } /** - * @param Stmt $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->nodesToRemoveCollector->isActive()) { return null; diff --git a/rules/CodingStyle/Rector/String_/SymplifyQuoteEscapeRector.php b/rules/CodingStyle/Rector/String_/SymplifyQuoteEscapeRector.php index a527aa1221e..5664cc5cf70 100644 --- a/rules/CodingStyle/Rector/String_/SymplifyQuoteEscapeRector.php +++ b/rules/CodingStyle/Rector/String_/SymplifyQuoteEscapeRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Scalar\String_ + public function refactor($node) : \PhpParser\Node\Scalar\String_ { $doubleQuoteCount = \substr_count($node->value, '"'); $singleQuoteCount = \substr_count($node->value, "'"); diff --git a/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php b/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php index 08006e01984..d2ffea33d65 100644 --- a/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php +++ b/rules/CodingStyle/Rector/String_/UseClassKeywordForClassNameResolutionRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classNames = $this->getExistingClasses($node); if ($classNames === []) { @@ -66,8 +66,9 @@ CODE_SAMPLE } /** * @return string[] + * @param \PhpParser\Node\Scalar\String_ $string */ - public function getExistingClasses(\PhpParser\Node\Scalar\String_ $string) : array + public function getExistingClasses($string) : array { /** @var mixed[] $matches */ $matches = \RectorPrefix20211210\Nette\Utils\Strings::matchAll($string->value, self::CLASS_BEFORE_STATIC_ACCESS_REGEX, \PREG_PATTERN_ORDER); @@ -86,8 +87,9 @@ CODE_SAMPLE /** * @param string[] $classNames * @return mixed[] + * @param \PhpParser\Node\Scalar\String_ $string */ - public function getParts(\PhpParser\Node\Scalar\String_ $string, array $classNames) : array + public function getParts($string, $classNames) : array { $quotedClassNames = \array_map('preg_quote', $classNames); // @see https://regex101.com/r/8nGS0F/1 diff --git a/rules/CodingStyle/Rector/Switch_/BinarySwitchToIfElseRector.php b/rules/CodingStyle/Rector/Switch_/BinarySwitchToIfElseRector.php index 06dd1335b53..b802437cd84 100644 --- a/rules/CodingStyle/Rector/Switch_/BinarySwitchToIfElseRector.php +++ b/rules/CodingStyle/Rector/Switch_/BinarySwitchToIfElseRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->cases) > 2) { return null; diff --git a/rules/CodingStyle/Rector/Ternary/TernaryConditionVariableAssignmentRector.php b/rules/CodingStyle/Rector/Ternary/TernaryConditionVariableAssignmentRector.php index 2f9763dad0e..73a44be66fa 100644 --- a/rules/CodingStyle/Rector/Ternary/TernaryConditionVariableAssignmentRector.php +++ b/rules/CodingStyle/Rector/Ternary/TernaryConditionVariableAssignmentRector.php @@ -40,9 +40,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $nodeIf = $node->if; $nodeElse = $node->else; diff --git a/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php b/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php index 89aa4cf0c63..6969656b1ca 100644 --- a/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php +++ b/rules/CodingStyle/Rector/Use_/SeparateMultiUseImportsRector.php @@ -44,10 +44,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Use_::class, \PhpParser\Node\Stmt\TraitUse::class]; } /** - * @param Use_|TraitUse $node + * @param \PhpParser\Node $node * @return Use_[]|TraitUse[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($node instanceof \PhpParser\Node\Stmt\Use_) { return $this->refactorUseImport($node); diff --git a/rules/Compatibility/Rector/Class_/AttributeCompatibleAnnotationRector.php b/rules/Compatibility/Rector/Class_/AttributeCompatibleAnnotationRector.php index 1084f76e8ee..0cd90c9146c 100644 --- a/rules/Compatibility/Rector/Class_/AttributeCompatibleAnnotationRector.php +++ b/rules/Compatibility/Rector/Class_/AttributeCompatibleAnnotationRector.php @@ -100,9 +100,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/rules/Composer/Contract/Rector/ComposerRectorInterface.php b/rules/Composer/Contract/Rector/ComposerRectorInterface.php index b7788d64163..15127a51021 100644 --- a/rules/Composer/Contract/Rector/ComposerRectorInterface.php +++ b/rules/Composer/Contract/Rector/ComposerRectorInterface.php @@ -8,5 +8,8 @@ use Rector\Core\Contract\Rector\RectorInterface; use Symplify\ComposerJsonManipulator\ValueObject\ComposerJson; interface ComposerRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface, \Rector\Core\Contract\Rector\ConfigurableRectorInterface { - public function refactor(\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void; + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void; } diff --git a/rules/Composer/Rector/AddPackageToRequireComposerRector.php b/rules/Composer/Rector/AddPackageToRequireComposerRector.php index 36219690aef..56586d8b4cb 100644 --- a/rules/Composer/Rector/AddPackageToRequireComposerRector.php +++ b/rules/Composer/Rector/AddPackageToRequireComposerRector.php @@ -33,7 +33,10 @@ final class AddPackageToRequireComposerRector implements \Rector\Composer\Contra { $this->versionGuard = $versionGuard; } - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->packagesAndVersions as $packageAndVersion) { $composerJson->addRequiredPackage($packageAndVersion->getPackageName(), $packageAndVersion->getVersion()); @@ -57,7 +60,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $packagesAndVersions = $configuration[self::PACKAGES_AND_VERSIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($packagesAndVersions, \Rector\Composer\ValueObject\PackageAndVersion::class); diff --git a/rules/Composer/Rector/AddPackageToRequireDevComposerRector.php b/rules/Composer/Rector/AddPackageToRequireDevComposerRector.php index 17620411584..4010cc90cf5 100644 --- a/rules/Composer/Rector/AddPackageToRequireDevComposerRector.php +++ b/rules/Composer/Rector/AddPackageToRequireDevComposerRector.php @@ -33,7 +33,10 @@ final class AddPackageToRequireDevComposerRector implements \Rector\Composer\Con { $this->versionGuard = $versionGuard; } - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->packageAndVersions as $packageAndVersion) { $composerJson->addRequiredDevPackage($packageAndVersion->getPackageName(), $packageAndVersion->getVersion()); @@ -57,7 +60,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $packagesAndVersions = $configuration[self::PACKAGES_AND_VERSIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($packagesAndVersions, \Rector\Composer\ValueObject\PackageAndVersion::class); diff --git a/rules/Composer/Rector/ChangePackageVersionComposerRector.php b/rules/Composer/Rector/ChangePackageVersionComposerRector.php index ebe3a35789d..b8aa88025ea 100644 --- a/rules/Composer/Rector/ChangePackageVersionComposerRector.php +++ b/rules/Composer/Rector/ChangePackageVersionComposerRector.php @@ -33,7 +33,10 @@ final class ChangePackageVersionComposerRector implements \Rector\Composer\Contr { $this->versionGuard = $versionGuard; } - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->packagesAndVersions as $packageAndVersion) { $composerJson->changePackageVersion($packageAndVersion->getPackageName(), $packageAndVersion->getVersion()); @@ -60,7 +63,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $packagesAndVersions = $configuration[self::PACKAGES_AND_VERSIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($packagesAndVersions, \Rector\Composer\ValueObject\PackageAndVersion::class); diff --git a/rules/Composer/Rector/RemovePackageComposerRector.php b/rules/Composer/Rector/RemovePackageComposerRector.php index ffdf9fa00b4..707fb299711 100644 --- a/rules/Composer/Rector/RemovePackageComposerRector.php +++ b/rules/Composer/Rector/RemovePackageComposerRector.php @@ -22,7 +22,10 @@ final class RemovePackageComposerRector implements \Rector\Composer\Contract\Rec * @var string[] */ private $packageNames = []; - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->packageNames as $packageName) { $composerJson->removePackage($packageName); @@ -46,7 +49,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $packagesNames = $configuration[self::PACKAGE_NAMES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($packagesNames); diff --git a/rules/Composer/Rector/RenamePackageComposerRector.php b/rules/Composer/Rector/RenamePackageComposerRector.php index 7af8efcd8fa..291fcd5f579 100644 --- a/rules/Composer/Rector/RenamePackageComposerRector.php +++ b/rules/Composer/Rector/RenamePackageComposerRector.php @@ -23,7 +23,10 @@ final class RenamePackageComposerRector implements \Rector\Composer\Contract\Rec * @var RenamePackage[] */ private $renamePackages = []; - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->renamePackages as $renamePackage) { if ($composerJson->hasRequiredPackage($renamePackage->getOldPackageName())) { @@ -57,7 +60,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $renamePackages = $configuration[self::RENAME_PACKAGES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($renamePackages, \Rector\Composer\ValueObject\RenamePackage::class); diff --git a/rules/Composer/Rector/ReplacePackageAndVersionComposerRector.php b/rules/Composer/Rector/ReplacePackageAndVersionComposerRector.php index 244372c115f..d2174dc8ced 100644 --- a/rules/Composer/Rector/ReplacePackageAndVersionComposerRector.php +++ b/rules/Composer/Rector/ReplacePackageAndVersionComposerRector.php @@ -33,7 +33,10 @@ final class ReplacePackageAndVersionComposerRector implements \Rector\Composer\C { $this->versionGuard = $versionGuard; } - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { foreach ($this->replacePackagesAndVersions as $replacePackageAndVersion) { $composerJson->replacePackage($replacePackageAndVersion->getOldPackageName(), $replacePackageAndVersion->getNewPackageName(), $replacePackageAndVersion->getVersion()); @@ -60,7 +63,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $replacePackagesAndVersions = $configuration[self::REPLACE_PACKAGES_AND_VERSIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($replacePackagesAndVersions, \Rector\Composer\ValueObject\ReplacePackageAndVersion::class); diff --git a/rules/DeadCode/Rector/Array_/RemoveDuplicatedArrayKeyRector.php b/rules/DeadCode/Rector/Array_/RemoveDuplicatedArrayKeyRector.php index 7958dc7d0ce..eef60a75ca9 100644 --- a/rules/DeadCode/Rector/Array_/RemoveDuplicatedArrayKeyRector.php +++ b/rules/DeadCode/Rector/Array_/RemoveDuplicatedArrayKeyRector.php @@ -38,9 +38,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $arrayItemsWithDuplicatedKey = $this->getArrayItemsWithDuplicatedKey($node); if ($arrayItemsWithDuplicatedKey === []) { diff --git a/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php index 4bd3a274344..7d6ba141f01 100644 --- a/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveDoubleAssignRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\Variable && !$node->var instanceof \PhpParser\Node\Expr\PropertyFetch && !$node->var instanceof \PhpParser\Node\Expr\StaticPropertyFetch) { return null; diff --git a/rules/DeadCode/Rector/Assign/RemoveUnusedAssignVariableRector.php b/rules/DeadCode/Rector/Assign/RemoveUnusedAssignVariableRector.php index b2ab4c1296e..c4a50bf2324 100644 --- a/rules/DeadCode/Rector/Assign/RemoveUnusedAssignVariableRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveUnusedAssignVariableRector.php @@ -98,9 +98,9 @@ CODE_SAMPLE )]); } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipAssign($node)) { return null; diff --git a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php index 377f34c72dd..fe71b248d8f 100644 --- a/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php +++ b/rules/DeadCode/Rector/Assign/RemoveUnusedVariableAssignRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/BinaryOp/RemoveDuplicatedInstanceOfRector.php b/rules/DeadCode/Rector/BinaryOp/RemoveDuplicatedInstanceOfRector.php index a4e0d91f7fb..39cd1a38705 100644 --- a/rules/DeadCode/Rector/BinaryOp/RemoveDuplicatedInstanceOfRector.php +++ b/rules/DeadCode/Rector/BinaryOp/RemoveDuplicatedInstanceOfRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp::class]; } /** - * @param BinaryOp $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $duplicatedInstanceOfs = $this->resolveDuplicatedInstancesOf($node); if ($duplicatedInstanceOfs === []) { diff --git a/rules/DeadCode/Rector/BooleanAnd/RemoveAndTrueRector.php b/rules/DeadCode/Rector/BooleanAnd/RemoveAndTrueRector.php index d0f41ea7c1d..a6947d129f7 100644 --- a/rules/DeadCode/Rector/BooleanAnd/RemoveAndTrueRector.php +++ b/rules/DeadCode/Rector/BooleanAnd/RemoveAndTrueRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\BooleanAnd::class]; } /** - * @param BooleanAnd $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isTrueOrBooleanAndTrues($node->left)) { return $node->right; diff --git a/rules/DeadCode/Rector/Cast/RecastingRemovalRector.php b/rules/DeadCode/Rector/Cast/RecastingRemovalRector.php index be7f7ce297c..ae2787d7676 100644 --- a/rules/DeadCode/Rector/Cast/RecastingRemovalRector.php +++ b/rules/DeadCode/Rector/Cast/RecastingRemovalRector.php @@ -86,9 +86,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Cast::class]; } /** - * @param Cast $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $nodeClass = \get_class($node); if (!isset(self::CAST_CLASS_TO_NODE_TYPE[$nodeClass])) { diff --git a/rules/DeadCode/Rector/ClassConst/RemoveUnusedPrivateClassConstantRector.php b/rules/DeadCode/Rector/ClassConst/RemoveUnusedPrivateClassConstantRector.php index dccb8484907..aaf9a11fcd0 100644 --- a/rules/DeadCode/Rector/ClassConst/RemoveUnusedPrivateClassConstantRector.php +++ b/rules/DeadCode/Rector/ClassConst/RemoveUnusedPrivateClassConstantRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClassConst($node)) { return null; diff --git a/rules/DeadCode/Rector/ClassLike/RemoveAnnotationRector.php b/rules/DeadCode/Rector/ClassLike/RemoveAnnotationRector.php index 1f39015457d..d0f2c1d0528 100644 --- a/rules/DeadCode/Rector/ClassLike/RemoveAnnotationRector.php +++ b/rules/DeadCode/Rector/ClassLike/RemoveAnnotationRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassLike::class, \PhpParser\Node\FunctionLike::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassLike|FunctionLike|Property|ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->annotationsToRemove === []) { return null; @@ -88,7 +88,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $annotationsToRemove = $configuration[self::ANNOTATIONS_TO_REMOVE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($annotationsToRemove); diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php index 3c2b17aef12..39e4cece4ef 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveDeadConstructorRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php index b3ba187e0d9..974bf2e79d6 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveDelegatingParentCallRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if ($this->shouldSkipClass($classLike)) { diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php index 1140cc22fdb..b91e2181a9d 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveEmptyClassMethodRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php index 9986946dfde..a086dcde1d7 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveLastReturnRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class]; } /** - * @param ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // last node and last return $lastNode = $this->betterNodeFinder->findLastInstanceOf((array) $node->stmts, \PhpParser\Node::class); diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php index ecac696c07b..d183891b2f9 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedConstructorParamRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { return null; diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedParamInRequiredAutowireRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedParamInRequiredAutowireRector.php index 83a1acac9f4..08cc7e30105 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedParamInRequiredAutowireRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedParamInRequiredAutowireRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php index a6049356b35..de254ee64ce 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodParameterRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php index 809b6374df9..0c41927757a 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPrivateMethodRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php index 0b1d0850586..40f019799b7 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUnusedPromotedPropertyRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $hasRemovedProperty = \false; if (!$this->isName($node, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector.php index ae6d376dbe2..387bf3ad5b7 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUselessParamTagRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/rules/DeadCode/Rector/ClassMethod/RemoveUselessReturnTagRector.php b/rules/DeadCode/Rector/ClassMethod/RemoveUselessReturnTagRector.php index f871cf70160..a43d665d504 100644 --- a/rules/DeadCode/Rector/ClassMethod/RemoveUselessReturnTagRector.php +++ b/rules/DeadCode/Rector/ClassMethod/RemoveUselessReturnTagRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $this->returnTagRemover->removeReturnTagIfUseless($phpDocInfo, $node); diff --git a/rules/DeadCode/Rector/Concat/RemoveConcatAutocastRector.php b/rules/DeadCode/Rector/Concat/RemoveConcatAutocastRector.php index 43b22348ad1..81f8db27873 100644 --- a/rules/DeadCode/Rector/Concat/RemoveConcatAutocastRector.php +++ b/rules/DeadCode/Rector/Concat/RemoveConcatAutocastRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Concat::class]; } /** - * @param Concat $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->left instanceof \PhpParser\Node\Expr\Cast\String_ && !$node->right instanceof \PhpParser\Node\Expr\Cast\String_) { return null; diff --git a/rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php b/rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php index 588d2a67397..a0f35515864 100644 --- a/rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php +++ b/rules/DeadCode/Rector/ConstFetch/RemovePhpVersionIdCheckRector.php @@ -44,7 +44,7 @@ final class RemovePhpVersionIdCheckRector extends \Rector\Core\Rector\AbstractRe /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $this->phpVersionConstraint = $configuration[self::PHP_VERSION_CONSTRAINT] ?? null; } @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'PHP_VERSION_ID')) { return null; diff --git a/rules/DeadCode/Rector/Expression/RemoveDeadStmtRector.php b/rules/DeadCode/Rector/Expression/RemoveDeadStmtRector.php index 84cfe921954..d93825bf56a 100644 --- a/rules/DeadCode/Rector/Expression/RemoveDeadStmtRector.php +++ b/rules/DeadCode/Rector/Expression/RemoveDeadStmtRector.php @@ -61,10 +61,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Expression::class]; } /** - * @param Expression $node + * @param \PhpParser\Node $node * @return Node[]|Node|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if ($this->hasGetMagic($node)) { return null; diff --git a/rules/DeadCode/Rector/Expression/SimplifyMirrorAssignRector.php b/rules/DeadCode/Rector/Expression/SimplifyMirrorAssignRector.php index 16fb423a03f..64fb9bbbf4e 100644 --- a/rules/DeadCode/Rector/Expression/SimplifyMirrorAssignRector.php +++ b/rules/DeadCode/Rector/Expression/SimplifyMirrorAssignRector.php @@ -29,9 +29,9 @@ final class SimplifyMirrorAssignRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Stmt\Expression::class]; } /** - * @param Expression $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\Assign) { return null; diff --git a/rules/DeadCode/Rector/For_/RemoveDeadContinueRector.php b/rules/DeadCode/Rector/For_/RemoveDeadContinueRector.php index 5ae69e67611..e78d5839021 100644 --- a/rules/DeadCode/Rector/For_/RemoveDeadContinueRector.php +++ b/rules/DeadCode/Rector/For_/RemoveDeadContinueRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Do_::class, \PhpParser\Node\Stmt\For_::class, \PhpParser\Node\Stmt\Foreach_::class, \PhpParser\Node\Stmt\While_::class]; } /** - * @param Do_|For_|Foreach_|While_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $modified = \false; while ($this->canRemoveLastStatement($node->stmts)) { diff --git a/rules/DeadCode/Rector/For_/RemoveDeadIfForeachForRector.php b/rules/DeadCode/Rector/For_/RemoveDeadIfForeachForRector.php index aa574ae84f4..9882f681c94 100644 --- a/rules/DeadCode/Rector/For_/RemoveDeadIfForeachForRector.php +++ b/rules/DeadCode/Rector/For_/RemoveDeadIfForeachForRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\For_::class, \PhpParser\Node\Stmt\If_::class, \PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param For_|If_|Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\If_) { $this->processIf($node); diff --git a/rules/DeadCode/Rector/For_/RemoveDeadLoopRector.php b/rules/DeadCode/Rector/For_/RemoveDeadLoopRector.php index c97d6e98490..6208ace8ea8 100644 --- a/rules/DeadCode/Rector/For_/RemoveDeadLoopRector.php +++ b/rules/DeadCode/Rector/For_/RemoveDeadLoopRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Do_::class, \PhpParser\Node\Stmt\For_::class, \PhpParser\Node\Stmt\Foreach_::class, \PhpParser\Node\Stmt\While_::class]; } /** - * @param Do_|For_|Foreach_|While_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->stmts !== []) { return null; diff --git a/rules/DeadCode/Rector/Foreach_/RemoveUnusedForeachKeyRector.php b/rules/DeadCode/Rector/Foreach_/RemoveUnusedForeachKeyRector.php index c24f5e872fe..fe24a1071dd 100644 --- a/rules/DeadCode/Rector/Foreach_/RemoveUnusedForeachKeyRector.php +++ b/rules/DeadCode/Rector/Foreach_/RemoveUnusedForeachKeyRector.php @@ -37,9 +37,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->keyVar === null) { return null; diff --git a/rules/DeadCode/Rector/FunctionLike/RemoveCodeAfterReturnRector.php b/rules/DeadCode/Rector/FunctionLike/RemoveCodeAfterReturnRector.php index 9a1675fcf9b..afc2b00d127 100644 --- a/rules/DeadCode/Rector/FunctionLike/RemoveCodeAfterReturnRector.php +++ b/rules/DeadCode/Rector/FunctionLike/RemoveCodeAfterReturnRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class]; } /** - * @param Closure|ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->stmts === null) { return null; diff --git a/rules/DeadCode/Rector/FunctionLike/RemoveDeadReturnRector.php b/rules/DeadCode/Rector/FunctionLike/RemoveDeadReturnRector.php index acd536635a5..682f435e439 100644 --- a/rules/DeadCode/Rector/FunctionLike/RemoveDeadReturnRector.php +++ b/rules/DeadCode/Rector/FunctionLike/RemoveDeadReturnRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->stmts === []) { return null; diff --git a/rules/DeadCode/Rector/FunctionLike/RemoveDuplicatedIfReturnRector.php b/rules/DeadCode/Rector/FunctionLike/RemoveDuplicatedIfReturnRector.php index c24806e86da..af6106fc683 100644 --- a/rules/DeadCode/Rector/FunctionLike/RemoveDuplicatedIfReturnRector.php +++ b/rules/DeadCode/Rector/FunctionLike/RemoveDuplicatedIfReturnRector.php @@ -93,9 +93,9 @@ CODE_SAMPLE return [\PhpParser\Node\FunctionLike::class]; } /** - * @param FunctionLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $ifWithOnlyReturnsByHash = $this->collectDuplicatedIfWithOnlyReturnByHash($node); if ($ifWithOnlyReturnsByHash === []) { diff --git a/rules/DeadCode/Rector/FunctionLike/RemoveOverriddenValuesRector.php b/rules/DeadCode/Rector/FunctionLike/RemoveOverriddenValuesRector.php index 93015c7b9c4..24af6ebb580 100644 --- a/rules/DeadCode/Rector/FunctionLike/RemoveOverriddenValuesRector.php +++ b/rules/DeadCode/Rector/FunctionLike/RemoveOverriddenValuesRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\FunctionLike::class]; } /** - * @param FunctionLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // 1. collect assigns $assignedVariables = $this->resolveAssignedVariables($node); diff --git a/rules/DeadCode/Rector/If_/RemoveAlwaysTrueIfConditionRector.php b/rules/DeadCode/Rector/If_/RemoveAlwaysTrueIfConditionRector.php index 38946d4a1b0..0e90b3f497e 100644 --- a/rules/DeadCode/Rector/If_/RemoveAlwaysTrueIfConditionRector.php +++ b/rules/DeadCode/Rector/If_/RemoveAlwaysTrueIfConditionRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->else !== null) { return null; diff --git a/rules/DeadCode/Rector/If_/RemoveDeadInstanceOfRector.php b/rules/DeadCode/Rector/If_/RemoveDeadInstanceOfRector.php index a1c2e5cb0b0..6c0231280e2 100644 --- a/rules/DeadCode/Rector/If_/RemoveDeadInstanceOfRector.php +++ b/rules/DeadCode/Rector/If_/RemoveDeadInstanceOfRector.php @@ -98,9 +98,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Stmt\If_ + public function refactor($node) : ?\PhpParser\Node\Stmt\If_ { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); // a trait diff --git a/rules/DeadCode/Rector/If_/RemoveUnusedNonEmptyArrayBeforeForeachRector.php b/rules/DeadCode/Rector/If_/RemoveUnusedNonEmptyArrayBeforeForeachRector.php index 11a48a36e61..e60066145f1 100644 --- a/rules/DeadCode/Rector/If_/RemoveUnusedNonEmptyArrayBeforeForeachRector.php +++ b/rules/DeadCode/Rector/If_/RemoveUnusedNonEmptyArrayBeforeForeachRector.php @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isUselessBeforeForeachCheck($node)) { return null; diff --git a/rules/DeadCode/Rector/If_/SimplifyIfElseWithSameContentRector.php b/rules/DeadCode/Rector/If_/SimplifyIfElseWithSameContentRector.php index 87226bcf742..bdb2335660a 100644 --- a/rules/DeadCode/Rector/If_/SimplifyIfElseWithSameContentRector.php +++ b/rules/DeadCode/Rector/If_/SimplifyIfElseWithSameContentRector.php @@ -50,10 +50,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return Stmt[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($node->else === null) { return null; diff --git a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php index a66a4e87770..4ecf6bcad5f 100644 --- a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php +++ b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfFunctionExistsRector.php @@ -71,10 +71,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return null|Stmt[] */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php index d3577ed4093..2c32d51c057 100644 --- a/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php +++ b/rules/DeadCode/Rector/If_/UnwrapFutureCompatibleIfPhpVersionRector.php @@ -58,10 +58,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return Stmt[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($node->elseifs !== []) { return null; diff --git a/rules/DeadCode/Rector/MethodCall/RemoveEmptyMethodCallRector.php b/rules/DeadCode/Rector/MethodCall/RemoveEmptyMethodCallRector.php index 087c6486b6c..9b409fcf665 100644 --- a/rules/DeadCode/Rector/MethodCall/RemoveEmptyMethodCallRector.php +++ b/rules/DeadCode/Rector/MethodCall/RemoveEmptyMethodCallRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $this->getScope($node); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/DeadCode/Rector/Node/RemoveNonExistingVarAnnotationRector.php b/rules/DeadCode/Rector/Node/RemoveNonExistingVarAnnotationRector.php index 21649af4b37..22e92717d73 100644 --- a/rules/DeadCode/Rector/Node/RemoveNonExistingVarAnnotationRector.php +++ b/rules/DeadCode/Rector/Node/RemoveNonExistingVarAnnotationRector.php @@ -87,7 +87,10 @@ CODE_SAMPLE { return [\PhpParser\Node::class]; } - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DeadCode/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php b/rules/DeadCode/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php index 57283aa628b..0a082f4bcde 100644 --- a/rules/DeadCode/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php +++ b/rules/DeadCode/Rector/Plus/RemoveDeadZeroAndOneOperationRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Plus::class, \PhpParser\Node\Expr\BinaryOp\Minus::class, \PhpParser\Node\Expr\BinaryOp\Mul::class, \PhpParser\Node\Expr\BinaryOp\Div::class, \PhpParser\Node\Expr\AssignOp\Plus::class, \PhpParser\Node\Expr\AssignOp\Minus::class, \PhpParser\Node\Expr\AssignOp\Mul::class, \PhpParser\Node\Expr\AssignOp\Div::class]; } /** - * @param Plus|Minus|Mul|Div|AssignPlus|AssignMinus|AssignMul|AssignDiv $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // $changedNode = null; // $previousNode = $node; diff --git a/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php b/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php index 9e1b6f95e9c..c682ba31337 100644 --- a/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php +++ b/rules/DeadCode/Rector/Property/RemoveUnusedPrivatePropertyRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipProperty($node)) { return null; diff --git a/rules/DeadCode/Rector/Property/RemoveUselessVarTagRector.php b/rules/DeadCode/Rector/Property/RemoveUselessVarTagRector.php index 1c937f2f8c3..27e1b396224 100644 --- a/rules/DeadCode/Rector/Property/RemoveUselessVarTagRector.php +++ b/rules/DeadCode/Rector/Property/RemoveUselessVarTagRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $this->varTagRemover->removeVarTagIfUseless($phpDocInfo, $node); diff --git a/rules/DeadCode/Rector/PropertyProperty/RemoveNullPropertyInitializationRector.php b/rules/DeadCode/Rector/PropertyProperty/RemoveNullPropertyInitializationRector.php index 1efb50de7e5..24fe9cb0c66 100644 --- a/rules/DeadCode/Rector/PropertyProperty/RemoveNullPropertyInitializationRector.php +++ b/rules/DeadCode/Rector/PropertyProperty/RemoveNullPropertyInitializationRector.php @@ -43,9 +43,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\PropertyProperty::class]; } /** - * @param PropertyProperty $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); // skip typed properties diff --git a/rules/DeadCode/Rector/Return_/RemoveDeadConditionAboveReturnRector.php b/rules/DeadCode/Rector/Return_/RemoveDeadConditionAboveReturnRector.php index 5c666172878..3bf1770a28d 100644 --- a/rules/DeadCode/Rector/Return_/RemoveDeadConditionAboveReturnRector.php +++ b/rules/DeadCode/Rector/Return_/RemoveDeadConditionAboveReturnRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $previousNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PREVIOUS_NODE); if (!$previousNode instanceof \PhpParser\Node\Stmt\If_) { diff --git a/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php b/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php index 35a000661f5..03d6692ff15 100644 --- a/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php +++ b/rules/DeadCode/Rector/StaticCall/RemoveParentCallWithoutParentRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/DeadCode/Rector/Stmt/RemoveUnreachableStatementRector.php b/rules/DeadCode/Rector/Stmt/RemoveUnreachableStatementRector.php index 110a208fa88..07e424e2b0c 100644 --- a/rules/DeadCode/Rector/Stmt/RemoveUnreachableStatementRector.php +++ b/rules/DeadCode/Rector/Stmt/RemoveUnreachableStatementRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt::class]; } /** - * @param Stmt $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipNode($node)) { return null; diff --git a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php index 3e5689a2c86..41c6c5adf54 100644 --- a/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php +++ b/rules/DeadCode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->cases) < 2) { return null; diff --git a/rules/DeadCode/Rector/Ternary/TernaryToBooleanOrFalseToBooleanAndRector.php b/rules/DeadCode/Rector/Ternary/TernaryToBooleanOrFalseToBooleanAndRector.php index fd4e11e57bd..9f7da4652ff 100644 --- a/rules/DeadCode/Rector/Ternary/TernaryToBooleanOrFalseToBooleanAndRector.php +++ b/rules/DeadCode/Rector/Ternary/TernaryToBooleanOrFalseToBooleanAndRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->if === null) { return null; diff --git a/rules/DeadCode/Rector/TryCatch/RemoveDeadTryCatchRector.php b/rules/DeadCode/Rector/TryCatch/RemoveDeadTryCatchRector.php index 2ad9e7429a9..79011ffb821 100644 --- a/rules/DeadCode/Rector/TryCatch/RemoveDeadTryCatchRector.php +++ b/rules/DeadCode/Rector/TryCatch/RemoveDeadTryCatchRector.php @@ -51,10 +51,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\TryCatch::class]; } /** - * @param TryCatch $node + * @param \PhpParser\Node $node * @return Stmt[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if (\count($node->catches) !== 1) { return null; diff --git a/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php b/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php index bf8610c3a5b..efecaa0450c 100644 --- a/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php +++ b/rules/DependencyInjection/Rector/ClassMethod/AddMethodParentCallRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { @@ -90,7 +90,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodsByParentTypes = $configuration[self::METHODS_BY_PARENT_TYPES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($methodsByParentTypes)); diff --git a/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php b/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php index 6e89557e48c..748ba0b64f0 100644 --- a/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php +++ b/rules/DependencyInjection/Rector/Class_/ActionInjectionToConstructorInjectionRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, '*Controller')) { return null; diff --git a/rules/DowngradePhp53/Rector/Dir/DirConstToFileConstRector.php b/rules/DowngradePhp53/Rector/Dir/DirConstToFileConstRector.php index f089313dafa..501a310a700 100644 --- a/rules/DowngradePhp53/Rector/Dir/DirConstToFileConstRector.php +++ b/rules/DowngradePhp53/Rector/Dir/DirConstToFileConstRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\MagicConst\Dir::class]; } /** - * @param Dir $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { return $this->nodeFactory->createFuncCall('dirname', [new \PhpParser\Node\Scalar\MagicConst\File()]); } diff --git a/rules/DowngradePhp54/Rector/Array_/ShortArrayToLongArrayRector.php b/rules/DowngradePhp54/Rector/Array_/ShortArrayToLongArrayRector.php index 328d4610d63..f89fa3cfa11 100644 --- a/rules/DowngradePhp54/Rector/Array_/ShortArrayToLongArrayRector.php +++ b/rules/DowngradePhp54/Rector/Array_/ShortArrayToLongArrayRector.php @@ -34,9 +34,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\Array_ + public function refactor($node) : ?\PhpParser\Node\Expr\Array_ { $kind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if ($kind === \PhpParser\Node\Expr\Array_::KIND_LONG) { diff --git a/rules/DowngradePhp54/Rector/Closure/DowngradeStaticClosureRector.php b/rules/DowngradePhp54/Rector/Closure/DowngradeStaticClosureRector.php index 7a8c28e0f0c..82c9e8cca31 100644 --- a/rules/DowngradePhp54/Rector/Closure/DowngradeStaticClosureRector.php +++ b/rules/DowngradePhp54/Rector/Closure/DowngradeStaticClosureRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Closure::class]; } /** - * @param Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->static) { return null; diff --git a/rules/DowngradePhp54/Rector/FuncCall/DowngradeIndirectCallByArrayRector.php b/rules/DowngradePhp54/Rector/FuncCall/DowngradeIndirectCallByArrayRector.php index a4d93a7a10f..f5bdce7cfe0 100644 --- a/rules/DowngradePhp54/Rector/FuncCall/DowngradeIndirectCallByArrayRector.php +++ b/rules/DowngradePhp54/Rector/FuncCall/DowngradeIndirectCallByArrayRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\FuncCall + public function refactor($node) : ?\PhpParser\Node\Expr\FuncCall { if (!$node->name instanceof \PhpParser\Node\Expr\Variable) { return null; diff --git a/rules/DowngradePhp54/Rector/FunctionLike/DowngradeCallableTypeDeclarationRector.php b/rules/DowngradePhp54/Rector/FunctionLike/DowngradeCallableTypeDeclarationRector.php index 036bf8ab218..16acd710113 100644 --- a/rules/DowngradePhp54/Rector/FunctionLike/DowngradeCallableTypeDeclarationRector.php +++ b/rules/DowngradePhp54/Rector/FunctionLike/DowngradeCallableTypeDeclarationRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Closure|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callableType = new \PHPStan\Type\CallableType(); foreach ($node->getParams() as $param) { diff --git a/rules/DowngradePhp54/Rector/LNumber/DowngradeBinaryNotationRector.php b/rules/DowngradePhp54/Rector/LNumber/DowngradeBinaryNotationRector.php index aeb71265dde..6d219482014 100644 --- a/rules/DowngradePhp54/Rector/LNumber/DowngradeBinaryNotationRector.php +++ b/rules/DowngradePhp54/Rector/LNumber/DowngradeBinaryNotationRector.php @@ -34,9 +34,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\LNumber::class]; } /** - * @param LNumber $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Scalar\LNumber + public function refactor($node) : ?\PhpParser\Node\Scalar\LNumber { $kind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if ($kind !== \PhpParser\Node\Scalar\LNumber::KIND_BIN) { diff --git a/rules/DowngradePhp54/Rector/MethodCall/DowngradeInstanceMethodCallRector.php b/rules/DowngradePhp54/Rector/MethodCall/DowngradeInstanceMethodCallRector.php index 12e91710fc5..bc067d4205c 100644 --- a/rules/DowngradePhp54/Rector/MethodCall/DowngradeInstanceMethodCallRector.php +++ b/rules/DowngradePhp54/Rector/MethodCall/DowngradeInstanceMethodCallRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\PropertyFetch::class, \PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param ArrayDimFetch|MethodCall|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp55/Rector/ClassConstFetch/DowngradeClassConstantToStringRector.php b/rules/DowngradePhp55/Rector/ClassConstFetch/DowngradeClassConstantToStringRector.php index af73bbe67e2..dc11ae3faa1 100644 --- a/rules/DowngradePhp55/Rector/ClassConstFetch/DowngradeClassConstantToStringRector.php +++ b/rules/DowngradePhp55/Rector/ClassConstFetch/DowngradeClassConstantToStringRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ClassConstFetch::class]; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->name instanceof \PhpParser\Node\Identifier) { return null; diff --git a/rules/DowngradePhp55/Rector/Foreach_/DowngradeForeachListRector.php b/rules/DowngradePhp55/Rector/Foreach_/DowngradeForeachListRector.php index e8aab108824..0e92fde0683 100644 --- a/rules/DowngradePhp55/Rector/Foreach_/DowngradeForeachListRector.php +++ b/rules/DowngradePhp55/Rector/Foreach_/DowngradeForeachListRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->valueVar instanceof \PhpParser\Node\Expr\List_) { return null; diff --git a/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php b/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php index 76a546fa31b..22824658b02 100644 --- a/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php +++ b/rules/DowngradePhp55/Rector/FuncCall/DowngradeBoolvalRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isName($node, self::BOOLVAL)) { return $this->refactorBoolval($node); diff --git a/rules/DowngradePhp55/Rector/Isset_/DowngradeArbitraryExpressionArgsToEmptyAndIssetRector.php b/rules/DowngradePhp55/Rector/Isset_/DowngradeArbitraryExpressionArgsToEmptyAndIssetRector.php index 0daa6e67023..9fe7c2c6a4d 100644 --- a/rules/DowngradePhp55/Rector/Isset_/DowngradeArbitraryExpressionArgsToEmptyAndIssetRector.php +++ b/rules/DowngradePhp55/Rector/Isset_/DowngradeArbitraryExpressionArgsToEmptyAndIssetRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Isset_::class, \PhpParser\Node\Expr\Empty_::class]; } /** - * @param Isset_|Empty_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp56/Rector/CallLike/DowngradeArgumentUnpackingRector.php b/rules/DowngradePhp56/Rector/CallLike/DowngradeArgumentUnpackingRector.php index 7259d524fc6..62809dfa941 100644 --- a/rules/DowngradePhp56/Rector/CallLike/DowngradeArgumentUnpackingRector.php +++ b/rules/DowngradePhp56/Rector/CallLike/DowngradeArgumentUnpackingRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\CallLike::class]; } /** - * @param CallLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $args = $node->getArgs(); if ($this->shouldSkip($args)) { diff --git a/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialAssignmentOperatorRector.php b/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialAssignmentOperatorRector.php index 24f2ee92371..e828bf1c397 100644 --- a/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialAssignmentOperatorRector.php +++ b/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialAssignmentOperatorRector.php @@ -28,9 +28,9 @@ final class DowngradeExponentialAssignmentOperatorRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\AssignOp\Pow::class]; } /** - * @param Pow $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Assign + public function refactor($node) : \PhpParser\Node\Expr\Assign { $powFuncCall = $this->nodeFactory->createFuncCall('pow', [$node->var, $node->expr]); return new \PhpParser\Node\Expr\Assign($node->var, $powFuncCall); diff --git a/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialOperatorRector.php b/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialOperatorRector.php index fbef2e0b945..2c125205e07 100644 --- a/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialOperatorRector.php +++ b/rules/DowngradePhp56/Rector/Pow/DowngradeExponentialOperatorRector.php @@ -28,9 +28,9 @@ final class DowngradeExponentialOperatorRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\BinaryOp\Pow::class]; } /** - * @param Pow $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { return $this->nodeFactory->createFuncCall('pow', [$node->left, $node->right]); } diff --git a/rules/DowngradePhp56/Rector/Use_/DowngradeUseFunctionRector.php b/rules/DowngradePhp56/Rector/Use_/DowngradeUseFunctionRector.php index afad0f9b20b..a805c2dc99e 100644 --- a/rules/DowngradePhp56/Rector/Use_/DowngradeUseFunctionRector.php +++ b/rules/DowngradePhp56/Rector/Use_/DowngradeUseFunctionRector.php @@ -40,9 +40,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Use_::class, \PhpParser\Node\Expr\ConstFetch::class, \PhpParser\Node\Expr\FuncCall::class]; } /** - * @param Use_|ConstFetch|FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Use_) { $this->refactorUse($node); diff --git a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php index f7d06259d49..83ccd96ddfd 100644 --- a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeParentTypeDeclarationRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php index 0cc51310544..b229604ca16 100644 --- a/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/ClassMethod/DowngradeSelfTypeDeclarationRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/DowngradePhp70/Rector/Coalesce/DowngradeNullCoalesceRector.php b/rules/DowngradePhp70/Rector/Coalesce/DowngradeNullCoalesceRector.php index 9866729967f..fb218327f90 100644 --- a/rules/DowngradePhp70/Rector/Coalesce/DowngradeNullCoalesceRector.php +++ b/rules/DowngradePhp70/Rector/Coalesce/DowngradeNullCoalesceRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE )]); } /** - * @param Coalesce $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Ternary + public function refactor($node) : \PhpParser\Node\Expr\Ternary { $if = $node->left; $else = $node->right; diff --git a/rules/DowngradePhp70/Rector/Declare_/DowngradeStrictTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/Declare_/DowngradeStrictTypeDeclarationRector.php index c5393053054..76b29a1d321 100644 --- a/rules/DowngradePhp70/Rector/Declare_/DowngradeStrictTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/Declare_/DowngradeStrictTypeDeclarationRector.php @@ -32,9 +32,9 @@ CODE_SAMPLE )]); } /** - * @param Declare_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php b/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php index 6d3e5538804..ee1823c0711 100644 --- a/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php +++ b/rules/DowngradePhp70/Rector/Expression/DowngradeDefineArrayConstantRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE )]); } /** - * @param Expression $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\FuncCall) { return null; diff --git a/rules/DowngradePhp70/Rector/FuncCall/DowngradeDirnameLevelsRector.php b/rules/DowngradePhp70/Rector/FuncCall/DowngradeDirnameLevelsRector.php index 9434b0a5d1a..366c612d265 100644 --- a/rules/DowngradePhp70/Rector/FuncCall/DowngradeDirnameLevelsRector.php +++ b/rules/DowngradePhp70/Rector/FuncCall/DowngradeDirnameLevelsRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $levelsArg = $this->getLevelsArg($node); if (!$levelsArg instanceof \PhpParser\Node\Arg) { diff --git a/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php b/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php index 14b3b6f84a8..8342eb3a944 100644 --- a/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php +++ b/rules/DowngradePhp70/Rector/FuncCall/DowngradeSessionStartArrayOptionsRector.php @@ -41,9 +41,9 @@ CODE_SAMPLE )]); } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php b/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php index aaaffc8d746..2407131f847 100644 --- a/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php +++ b/rules/DowngradePhp70/Rector/FunctionLike/DowngradeScalarTypeDeclarationRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE )]); } /** - * @param Function_|ClassMethod|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $recastAssigns = []; foreach ($node->params as $param) { diff --git a/rules/DowngradePhp70/Rector/GroupUse/SplitGroupedUseImportsRector.php b/rules/DowngradePhp70/Rector/GroupUse/SplitGroupedUseImportsRector.php index 2d244acdcd6..1a80e4e72d5 100644 --- a/rules/DowngradePhp70/Rector/GroupUse/SplitGroupedUseImportsRector.php +++ b/rules/DowngradePhp70/Rector/GroupUse/SplitGroupedUseImportsRector.php @@ -39,10 +39,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\GroupUse::class]; } /** - * @param GroupUse $node + * @param \PhpParser\Node $node * @return Use_[] */ - public function refactor(\PhpParser\Node $node) : array + public function refactor($node) : array { $prefix = $this->getName($node->prefix); $uses = []; diff --git a/rules/DowngradePhp70/Rector/MethodCall/DowngradeClosureCallRector.php b/rules/DowngradePhp70/Rector/MethodCall/DowngradeClosureCallRector.php index 548688c4657..268db3b8f47 100644 --- a/rules/DowngradePhp70/Rector/MethodCall/DowngradeClosureCallRector.php +++ b/rules/DowngradePhp70/Rector/MethodCall/DowngradeClosureCallRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\FuncCall + public function refactor($node) : ?\PhpParser\Node\Expr\FuncCall { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp70/Rector/New_/DowngradeAnonymousClassRector.php b/rules/DowngradePhp70/Rector/New_/DowngradeAnonymousClassRector.php index 85be41c21a6..2b7369be29e 100644 --- a/rules/DowngradePhp70/Rector/New_/DowngradeAnonymousClassRector.php +++ b/rules/DowngradePhp70/Rector/New_/DowngradeAnonymousClassRector.php @@ -90,7 +90,7 @@ CODE_SAMPLE * @param Node[] $nodes * @return Node[]|null */ - public function beforeTraverse(array $nodes) : ?array + public function beforeTraverse($nodes) : ?array { $this->classes = []; return parent::beforeTraverse($nodes); @@ -99,7 +99,7 @@ CODE_SAMPLE * @param Node[] $nodes * @return Node[] */ - public function afterTraverse(array $nodes) + public function afterTraverse($nodes) { if ($this->classes === []) { return $nodes; @@ -107,9 +107,9 @@ CODE_SAMPLE return \array_merge($nodes, $this->classes); } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->classAnalyzer->isAnonymousClass($node->class)) { return null; diff --git a/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php b/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php index f4e5fb7a3e5..6f54a2bfbcd 100644 --- a/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php +++ b/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE )]); } /** - * @param Spaceship $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { $leftVariableParam = new \PhpParser\Node\Expr\Variable('left'); $rightVariableParam = new \PhpParser\Node\Expr\Variable('right'); diff --git a/rules/DowngradePhp70/Rector/String_/DowngradeGeneratedScalarTypesRector.php b/rules/DowngradePhp70/Rector/String_/DowngradeGeneratedScalarTypesRector.php index 8e75b3c8abe..ef6e432cbed 100644 --- a/rules/DowngradePhp70/Rector/String_/DowngradeGeneratedScalarTypesRector.php +++ b/rules/DowngradePhp70/Rector/String_/DowngradeGeneratedScalarTypesRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $smartFileInfo = $this->file->getSmartFileInfo(); // this rule is parsing strings, so it heavy on performance; to lower it, we'll process only known opt-in files diff --git a/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php b/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php index 3d194e42dc7..10a538ac99d 100644 --- a/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php +++ b/rules/DowngradePhp71/Rector/Array_/SymmetricArrayDestructuringToListRector.php @@ -39,9 +39,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if ($parentNode instanceof \PhpParser\Node\Expr\Assign && $this->nodeComparator->areNodesEqual($node, $parentNode->var)) { diff --git a/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php b/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php index 05afc7f2025..f6308e22de2 100644 --- a/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php +++ b/rules/DowngradePhp71/Rector/ClassConst/DowngradeClassConstantVisibilityRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\ClassConst + public function refactor($node) : \PhpParser\Node\Stmt\ClassConst { $this->visibilityManipulator->removeVisibility($node); return $node; diff --git a/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php b/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php index 3e470f8fa49..be5706b91ac 100644 --- a/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php +++ b/rules/DowngradePhp71/Rector/FuncCall/DowngradeIsIterableRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE )]); } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'is_iterable')) { return null; diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php index 7950329eaf5..4219670c9b5 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeIterablePseudoTypeDeclarationRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE )]); } /** - * @param Function_|ClassMethod|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $iterableType = new \PHPStan\Type\IterableType(new \PHPStan\Type\MixedType(), new \PHPStan\Type\MixedType()); foreach ($node->params as $param) { diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php index f24640c00e7..c23628fe06f 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeNullableTypeDeclarationRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $hasChanged = \false; foreach ($node->params as $param) { diff --git a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php index 94cddce2a7b..00bea14fab8 100644 --- a/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php +++ b/rules/DowngradePhp71/Rector/FunctionLike/DowngradeVoidTypeDeclarationRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $voidType = new \PHPStan\Type\VoidType(); if (!$this->phpDocFromTypeDeclarationDecorator->decorateReturnWithSpecificType($node, $voidType)) { diff --git a/rules/DowngradePhp71/Rector/List_/DowngradeKeysInListRector.php b/rules/DowngradePhp71/Rector/List_/DowngradeKeysInListRector.php index f33e56ebea5..51971583363 100644 --- a/rules/DowngradePhp71/Rector/List_/DowngradeKeysInListRector.php +++ b/rules/DowngradePhp71/Rector/List_/DowngradeKeysInListRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE )]); } /** - * @param List_|Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node) { diff --git a/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php b/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php index e348d3bae1f..03d7f232acc 100644 --- a/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php +++ b/rules/DowngradePhp71/Rector/StaticCall/DowngradeClosureFromCallableRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE )]); } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php b/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php index e912878d499..ed4b0515695 100644 --- a/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php +++ b/rules/DowngradePhp71/Rector/String_/DowngradeNegativeStringOffsetToStrlenRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Scalar\String_::class, \PhpParser\Node\Expr\Variable::class, \PhpParser\Node\Expr\PropertyFetch::class, \PhpParser\Node\Expr\StaticPropertyFetch::class]; } /** - * @param FuncCall|String_|Variable|PropertyFetch|StaticPropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\FuncCall) { return $this->processForFuncCall($node); diff --git a/rules/DowngradePhp71/Rector/TryCatch/DowngradePipeToMultiCatchExceptionRector.php b/rules/DowngradePhp71/Rector/TryCatch/DowngradePipeToMultiCatchExceptionRector.php index 5e9f7756615..96171d058a7 100644 --- a/rules/DowngradePhp71/Rector/TryCatch/DowngradePipeToMultiCatchExceptionRector.php +++ b/rules/DowngradePhp71/Rector/TryCatch/DowngradePipeToMultiCatchExceptionRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\TryCatch::class]; } /** - * @param TryCatch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $originalCatches = $node->catches; foreach ($node->catches as $key => $catch) { diff --git a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php index 345d5126ceb..c4380bad30b 100644 --- a/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php +++ b/rules/DowngradePhp72/Rector/ClassMethod/DowngradeParameterTypeWideningRector.php @@ -28,13 +28,19 @@ use RectorPrefix20211210\Webmozart\Assert\Assert; final class DowngradeParameterTypeWideningRector extends \Rector\Core\Rector\AbstractRector implements \Rector\Core\Contract\Rector\ConfigurableRectorInterface { /** + * @deprecated Use self::UNSAFE_TYPES_TO_METHODS instead * @var string */ public const SAFE_TYPES = 'safe_types'; /** + * @deprecated Use self::UNSAFE_TYPES_TO_METHODS instead * @var string */ public const SAFE_TYPES_TO_METHODS = 'safe_types_to_methods'; + /** + * @var string + */ + public const UNSAFE_TYPES_TO_METHODS = 'unsafe_types_to_methods'; /** * @var string[] */ @@ -43,6 +49,10 @@ final class DowngradeParameterTypeWideningRector extends \Rector\Core\Rector\Abs * @var array */ private $safeTypesToMethods = []; + /** + * @var array + */ + private $unsafeTypesToMethods = []; /** * @readonly * @var \Rector\DowngradePhp72\PhpDoc\NativeParamToPhpDocDecorator @@ -113,7 +123,7 @@ final class SomeClass implements SomeInterface } } CODE_SAMPLE -, [self::SAFE_TYPES => [], self::SAFE_TYPES_TO_METHODS => []])]); +, [self::SAFE_TYPES => [], self::SAFE_TYPES_TO_METHODS => [], self::UNSAFE_TYPES_TO_METHODS => []])]); } /** * @return array> @@ -123,9 +133,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { @@ -141,7 +151,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $safeTypes = $configuration[self::SAFE_TYPES] ?? []; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($safeTypes); @@ -154,6 +164,13 @@ CODE_SAMPLE \RectorPrefix20211210\Webmozart\Assert\Assert::allString($value); } $this->safeTypesToMethods = $safeTypesToMethods; + $unsafeTypesToMethods = $configuration[self::UNSAFE_TYPES_TO_METHODS] ?? []; + \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($unsafeTypesToMethods); + foreach ($unsafeTypesToMethods as $key => $value) { + \RectorPrefix20211210\Webmozart\Assert\Assert::string($key); + \RectorPrefix20211210\Webmozart\Assert\Assert::allString($value); + } + $this->unsafeTypesToMethods = $unsafeTypesToMethods; } private function shouldSkip(\PHPStan\Reflection\ClassReflection $classReflection, \PhpParser\Node\Stmt\ClassMethod $classMethod) : bool { @@ -234,6 +251,18 @@ CODE_SAMPLE return \true; } } + foreach ($this->unsafeTypesToMethods as $unsafeType => $unsafeMethods) { + if (!$this->isNames($classMethod, $unsafeMethods)) { + continue; + } + if ($classReflection->isSubclassOf($unsafeType)) { + return \false; + } + // skip self too + if ($classReflectionName === $unsafeType) { + return \false; + } + } return \false; } } diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php index 9a6e6c3ced8..920f6fad3bf 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradePregUnmatchedAsNullConstantRector.php @@ -58,9 +58,9 @@ final class DowngradePregUnmatchedAsNullConstantRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param FuncCall|ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassConst) { return $this->processsClassConst($node); diff --git a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php index 8d942d0228a..cff08bd196d 100644 --- a/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php +++ b/rules/DowngradePhp72/Rector/FuncCall/DowngradeStreamIsattyRector.php @@ -86,9 +86,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'stream_isatty')) { return null; diff --git a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php index 1c437abbd6a..0f3f590511c 100644 --- a/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php +++ b/rules/DowngradePhp72/Rector/FunctionLike/DowngradeObjectTypeDeclarationRector.php @@ -34,9 +34,9 @@ final class DowngradeObjectTypeDeclarationRector extends \Rector\Core\Rector\Abs return [\PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param Function_|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $objectWithoutClassType = new \PHPStan\Type\ObjectWithoutClassType(); foreach ($node->params as $param) { diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php index d3cbb3643c7..710ded00f3b 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeArrayKeyFirstLastRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isName($node, 'array_key_first')) { return $this->refactorArrayKeyFirst($node); diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php index d39f4e9bd48..68c95ee8bbd 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeIsCountableRector.php @@ -39,9 +39,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'is_countable')) { return null; diff --git a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php index 0173da39838..d3ffc7d72ce 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/DowngradeTrailingCommasInFunctionCallsRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->args) { \end($node->args); diff --git a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php index e0e5f97c12f..1f9d46ec703 100644 --- a/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php +++ b/rules/DowngradePhp73/Rector/FuncCall/SetCookieOptionsArrayToArgumentsRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php index 7d69ceb6c30..721ced08bb6 100644 --- a/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php +++ b/rules/DowngradePhp73/Rector/List_/DowngradeListReferenceAssignmentRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\List_::class, \PhpParser\Node\Expr\Array_::class]; } /** - * @param List_|Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->shouldRefactor($node)) { return null; @@ -102,8 +102,9 @@ CODE_SAMPLE * If all of them can be removed, then directly remove `list()`. * @return List_|Array_|null * @param \PhpParser\Node\Expr\Array_|\PhpParser\Node\Expr\List_ $node + * @param int $rightSideRemovableParamsCount */ - public function removeStaleParams($node, int $rightSideRemovableParamsCount) : ?\PhpParser\Node + public function removeStaleParams($node, $rightSideRemovableParamsCount) : ?\PhpParser\Node { $nodeItemsCount = \count($node->items); if ($rightSideRemovableParamsCount === $nodeItemsCount) { diff --git a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php index 9588f00b9a2..5a5bdb32001 100644 --- a/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php +++ b/rules/DowngradePhp73/Rector/String_/DowngradeFlexibleHeredocSyntaxRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class, \PhpParser\Node\Scalar\Encapsed::class]; } /** - * @param Encapsed|String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $stringKind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if (!\in_array($stringKind, self::HERENOW_DOC_KINDS, \true)) { diff --git a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php index 5e53ad07e4f..2e261dae95a 100644 --- a/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php +++ b/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php @@ -93,9 +93,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->shouldRefactor($node)) { return null; diff --git a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php index 9b36475f73b..6af46f34001 100644 --- a/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php +++ b/rules/DowngradePhp74/Rector/ArrowFunction/ArrowFunctionToAnonymousFunctionRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Closure + public function refactor($node) : \PhpParser\Node\Expr\Closure { $stmts = [new \PhpParser\Node\Stmt\Return_($node->expr)]; return $this->anonymousFunctionFactory->create($node->params, $stmts, $node->returnType, $node->static); diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php index 4b41164bcd6..11036fc9af4 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeContravariantArgumentTypeRector.php @@ -94,9 +94,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->params === []) { return null; diff --git a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php index ec4b35847bc..3a842e3edac 100644 --- a/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php +++ b/rules/DowngradePhp74/Rector/ClassMethod/DowngradeCovariantReturnTypeRector.php @@ -109,9 +109,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->returnType === null) { return null; diff --git a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php index 42903bb797c..2d79ab639b9 100644 --- a/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php +++ b/rules/DowngradePhp74/Rector/Coalesce/DowngradeNullCoalescingOperatorRector.php @@ -36,9 +36,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\AssignOp\Coalesce::class]; } /** - * @param AssignCoalesce $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Assign + public function refactor($node) : \PhpParser\Node\Expr\Assign { return new \PhpParser\Node\Expr\Assign($node->var, new \PhpParser\Node\Expr\BinaryOp\Coalesce($node->var, $node->expr)); } diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php index 8261b463e03..3d68f64b54a 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeArrayMergeCallWithoutArgumentsRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->shouldRefactor($node)) { return null; diff --git a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php index 056f4eba769..8ba56cc7502 100644 --- a/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php +++ b/rules/DowngradePhp74/Rector/FuncCall/DowngradeStripTagsCallWithArrayRector.php @@ -84,9 +84,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipFuncCall($node)) { return null; diff --git a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php index c25b633d828..b0804b5ef89 100644 --- a/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php +++ b/rules/DowngradePhp74/Rector/Identical/DowngradeFreadFwriteFalsyToNegationRector.php @@ -40,9 +40,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class]; } /** - * @param Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $compareValue = $this->getCompareValue($node); if (!$compareValue instanceof \PhpParser\Node\Expr) { diff --git a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php index fa0b6d20f58..5dc265977dc 100644 --- a/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php +++ b/rules/DowngradePhp74/Rector/Interface_/DowngradePreviouslyImplementedInterfaceRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Interface_::class]; } /** - * @param Interface_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $extends = $node->extends; if ($extends === []) { diff --git a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php index 753a504b6df..a2a7aaafb29 100644 --- a/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php +++ b/rules/DowngradePhp74/Rector/LNumber/DowngradeNumericLiteralSeparatorRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\LNumber::class, \PhpParser\Node\Scalar\DNumber::class]; } /** - * @param LNumber|DNumber $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->shouldRefactor($node)) { return null; diff --git a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php index bcdd452725a..fe151fb5e21 100644 --- a/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php +++ b/rules/DowngradePhp74/Rector/MethodCall/DowngradeReflectionGetTypeRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'getType')) { return null; diff --git a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php index ac4001450a5..2ed27c3abed 100644 --- a/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php +++ b/rules/DowngradePhp74/Rector/Property/DowngradeTypedPropertyRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE )]); } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->type === null) { return null; diff --git a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php index ee8da235e78..56fdf7c9db5 100644 --- a/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php +++ b/rules/DowngradePhp80/Rector/ArrayDimFetch/DowngradeDereferenceableOperationRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php index fc1e2bcea91..7d4eeff9185 100644 --- a/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php +++ b/rules/DowngradePhp80/Rector/Catch_/DowngradeNonCapturingCatchesRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Catch_::class]; } /** - * @param Catch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->var !== null) { return null; diff --git a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php index 5ba25f28114..490b2004b2d 100644 --- a/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php +++ b/rules/DowngradePhp80/Rector/ClassConstFetch/DowngradeClassOnObjectToGetClassRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ClassConstFetch::class]; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'class')) { return null; diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php index 6538c76bd8e..42562d512a3 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeAbstractPrivateMethodInTraitRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php index f665676b881..c665f137c09 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeRecursiveDirectoryIteratorHasChildrenRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeNameResolver->isName($node, 'hasChildren')) { return null; diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php index 426922bf419..3bcf309ef8b 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeStaticTypeDeclarationRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php index fb3470d85ab..4a9aaec013b 100644 --- a/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php +++ b/rules/DowngradePhp80/Rector/ClassMethod/DowngradeTrailingCommasInParamUseRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\New_::class]; } /** - * @param ClassMethod|Function_|Closure|FuncCall|MethodCall|StaticCall|New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\MethodCall || $node instanceof \PhpParser\Node\Expr\FuncCall || $node instanceof \PhpParser\Node\Expr\StaticCall || $node instanceof \PhpParser\Node\Expr\New_) { /** @var MethodCall|FuncCall|StaticCall|New_ $node */ diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php index 6af642cd8d9..784bebeb695 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradeAttributeToAnnotationRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\Interface_::class, \PhpParser\Node\Param::class, \PhpParser\Node\Stmt\Function_::class]; } /** - * @param Class_|ClassMethod|Property|Interface_|Param|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); foreach ($node->attrGroups as $attrGroup) { @@ -108,7 +108,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $attributesToAnnotations = $configuration[self::ATTRIBUTE_TO_ANNOTATION] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($attributesToAnnotations, \Rector\DowngradePhp80\ValueObject\DowngradeAttributeToAnnotation::class); diff --git a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php index 2ac2aa824a7..352a1b7dc1d 100644 --- a/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php +++ b/rules/DowngradePhp80/Rector/Class_/DowngradePropertyPromotionRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldComments = $this->getOldComments($node); $promotedParams = $this->resolvePromotedParams($node); diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php index 13f8661cdbf..0d8ba17b12d 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeMatchToSwitchRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Expression::class, \PhpParser\Node\Stmt\Return_::class]; } /** - * @param Expression|Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php index b191297a867..9715ef96bab 100644 --- a/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php +++ b/rules/DowngradePhp80/Rector/Expression/DowngradeThrowExprRector.php @@ -73,10 +73,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Expression::class, \PhpParser\Node\Stmt\Return_::class]; } /** - * @param Expression|Return_ $node + * @param \PhpParser\Node $node * @return Node|Node[]|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if ($node instanceof \PhpParser\Node\Stmt\Return_) { return $this->refactorReturn($node); diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php index 06069a1d8b0..d7185af306c 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrContainsRector.php @@ -59,10 +59,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param FuncCall|BooleanNot $node + * @param \PhpParser\Node $node * @return Identical|NotIdentical|null The refactored node. */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { $funcCall = $this->matchStrContainsOrNotStrContains($node); if (!$funcCall instanceof \PhpParser\Node\Expr\FuncCall) { diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php index a310c7f0298..ada8b651c5a 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrEndsWithRector.php @@ -35,9 +35,9 @@ final class DowngradeStrEndsWithRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param FuncCall|BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\FuncCall && $this->isName($node->name, 'str_ends_with')) { return new \PhpParser\Node\Expr\BinaryOp\Identical($this->createSubstrCompareFuncCall($node), new \PhpParser\Node\Scalar\LNumber(0)); diff --git a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php index 1e3004d08dd..f11eb88f6d9 100644 --- a/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php +++ b/rules/DowngradePhp80/Rector/FuncCall/DowngradeStrStartsWithRector.php @@ -33,9 +33,9 @@ final class DowngradeStrStartsWithRector extends \Rector\Core\Rector\AbstractRec return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param FuncCall|BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\FuncCall && $this->isName($node, 'str_starts_with')) { return $this->createIdentical($node); diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php index 88a79e20e3e..589b4a92dc2 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeMixedTypeDeclarationRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $mixedType = new \PHPStan\Type\MixedType(); foreach ($node->getParams() as $param) { diff --git a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php index cd0a060f1c7..c4108b5a489 100644 --- a/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php +++ b/rules/DowngradePhp80/Rector/FunctionLike/DowngradeUnionTypeDeclarationRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Closure|Function_|ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->getParams() as $param) { if (!$param->type instanceof \PhpParser\Node\UnionType) { diff --git a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php index 1b938ee5d6b..f6ce4e021f7 100644 --- a/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp80/Rector/Instanceof_/DowngradePhp80ResourceReturnToObjectRector.php @@ -87,9 +87,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Instanceof_::class]; } /** - * @param Instanceof_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->objectToResourceReturn->refactor($node, self::COLLECTION_OBJECT_TO_RESOURCE); } diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php index 950aff80f7c..8829caf501f 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeNamedArgumentRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE )]); } /** - * @param MethodCall|StaticCall|New_|FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $args = $node->args; if ($this->shouldSkip($args)) { diff --git a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php index 547adb6d4a3..312eb1c75e8 100644 --- a/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php +++ b/rules/DowngradePhp80/Rector/MethodCall/DowngradeReflectionGetAttributesRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'getAttributes')) { return null; diff --git a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php index a66bccf74df..362932e77dd 100644 --- a/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php +++ b/rules/DowngradePhp80/Rector/New_/DowngradeArbitraryExpressionsSupportRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Instanceof_::class, \PhpParser\Node\Expr\New_::class]; } /** - * @param Instanceof_|New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->class instanceof \PhpParser\Node\Expr) { return null; diff --git a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php index d44fd325b09..71a44b608c6 100644 --- a/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php +++ b/rules/DowngradePhp80/Rector/NullsafeMethodCall/DowngradeNullsafeToTernaryOperatorRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\NullsafeMethodCall::class, \PhpParser\Node\Expr\NullsafePropertyFetch::class]; } /** - * @param NullsafeMethodCall|NullsafePropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\Ternary + public function refactor($node) : \PhpParser\Node\Expr\Ternary { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); $tempVarName = $this->variableNaming->resolveFromNodeWithScopeCountAndFallbackName($node->var, $scope, '_'); diff --git a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php index 44dc636a680..e37891bac27 100644 --- a/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php +++ b/rules/DowngradePhp80/Rector/Property/DowngradeUnionTypeTypedPropertyRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE )]); } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->type === null) { return null; diff --git a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php index 57d41182741..4a37d46bd10 100644 --- a/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php +++ b/rules/DowngradePhp80/Rector/StaticCall/DowngradePhpTokenRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param StaticCall|MethodCall|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\StaticCall) { return $this->refactorStaticCall($node); diff --git a/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php b/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php index bd5a687b376..1d28178e408 100644 --- a/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php +++ b/rules/DowngradePhp81/Rector/Array_/DowngradeArraySpreadStringKeyRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php index 9377655beaf..0249a10814f 100644 --- a/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php +++ b/rules/DowngradePhp81/Rector/ClassConst/DowngradeFinalizePublicClassConstantRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->isFinal()) { return null; diff --git a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php index 9b4c0d1812c..88ee57ab2d3 100644 --- a/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php +++ b/rules/DowngradePhp81/Rector/FuncCall/DowngradeFirstClassCallableSyntaxRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\StaticCall + public function refactor($node) : ?\PhpParser\Node\Expr\StaticCall { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php index 08914494c74..0b820ca1097 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNeverTypeDeclarationRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Closure|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $neverType = new \PHPStan\Type\NeverType(); if (!$this->phpDocFromTypeDeclarationDecorator->decorateReturnWithSpecificType($node, $neverType)) { diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php index 6d578a10fdd..969ba3e0c4c 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradeNewInInitializerRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\FunctionLike::class]; } /** - * @param FunctionLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\FunctionLike + public function refactor($node) : ?\PhpParser\Node\FunctionLike { if ($this->shouldSkip($node)) { return null; diff --git a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php index 4e3d3f90ab1..7f7ac4c55dd 100644 --- a/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php +++ b/rules/DowngradePhp81/Rector/FunctionLike/DowngradePureIntersectionTypeRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE )]); } /** - * @param ArrowFunction|ClassMethod|Closure|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->getParams() as $param) { if (!$param->type instanceof \PhpParser\Node\IntersectionType) { diff --git a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php index 8ae5736731f..9b1b9a932f9 100644 --- a/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php +++ b/rules/DowngradePhp81/Rector/Instanceof_/DowngradePhp81ResourceReturnToObjectRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Instanceof_::class]; } /** - * @param Instanceof_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->objectToResourceReturn->refactor($node, self::COLLECTION_OBJECT_TO_RESOURCE); } diff --git a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php index 49b0ab7f316..2dce0190456 100644 --- a/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php +++ b/rules/DowngradePhp81/Rector/Property/DowngradeReadonlyPropertyRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE )]); } /** - * @param Property|Param $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->visibilityManipulator->isReadonly($node)) { return null; diff --git a/rules/EarlyReturn/Rector/Foreach_/ChangeNestedForeachIfsToEarlyContinueRector.php b/rules/EarlyReturn/Rector/Foreach_/ChangeNestedForeachIfsToEarlyContinueRector.php index ec6c48f896f..477493fc108 100644 --- a/rules/EarlyReturn/Rector/Foreach_/ChangeNestedForeachIfsToEarlyContinueRector.php +++ b/rules/EarlyReturn/Rector/Foreach_/ChangeNestedForeachIfsToEarlyContinueRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $nestedIfsWithOnlyNonReturn = $this->ifManipulator->collectNestedIfsWithNonBreaking($node); if (\count($nestedIfsWithOnlyNonReturn) < 2) { diff --git a/rules/EarlyReturn/Rector/Foreach_/ReturnAfterToEarlyOnBreakRector.php b/rules/EarlyReturn/Rector/Foreach_/ReturnAfterToEarlyOnBreakRector.php index 46ebc8d1b64..655129ba26d 100644 --- a/rules/EarlyReturn/Rector/Foreach_/ReturnAfterToEarlyOnBreakRector.php +++ b/rules/EarlyReturn/Rector/Foreach_/ReturnAfterToEarlyOnBreakRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Break_[] $breaks */ $breaks = $this->betterNodeFinder->findInstanceOf($node->stmts, \PhpParser\Node\Stmt\Break_::class); diff --git a/rules/EarlyReturn/Rector/If_/ChangeAndIfToEarlyReturnRector.php b/rules/EarlyReturn/Rector/If_/ChangeAndIfToEarlyReturnRector.php index 101a25c1f9f..b3c30d7c0ec 100644 --- a/rules/EarlyReturn/Rector/If_/ChangeAndIfToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/If_/ChangeAndIfToEarlyReturnRector.php @@ -95,10 +95,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return Node[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if ($this->shouldSkip($node)) { return null; diff --git a/rules/EarlyReturn/Rector/If_/ChangeIfElseValueAssignToEarlyReturnRector.php b/rules/EarlyReturn/Rector/If_/ChangeIfElseValueAssignToEarlyReturnRector.php index c500a169f70..ad0a392973d 100644 --- a/rules/EarlyReturn/Rector/If_/ChangeIfElseValueAssignToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/If_/ChangeIfElseValueAssignToEarlyReturnRector.php @@ -77,10 +77,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return Stmt[]|null */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { $nextNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE); if (!$nextNode instanceof \PhpParser\Node\Stmt\Return_) { diff --git a/rules/EarlyReturn/Rector/If_/ChangeNestedIfsToEarlyReturnRector.php b/rules/EarlyReturn/Rector/If_/ChangeNestedIfsToEarlyReturnRector.php index 3b400e3ec94..f094dcfeb74 100644 --- a/rules/EarlyReturn/Rector/If_/ChangeNestedIfsToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/If_/ChangeNestedIfsToEarlyReturnRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // A. next node is return $nextNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::NEXT_NODE); diff --git a/rules/EarlyReturn/Rector/If_/ChangeOrIfContinueToMultiContinueRector.php b/rules/EarlyReturn/Rector/If_/ChangeOrIfContinueToMultiContinueRector.php index 9200e8d924e..af266f8eb07 100644 --- a/rules/EarlyReturn/Rector/If_/ChangeOrIfContinueToMultiContinueRector.php +++ b/rules/EarlyReturn/Rector/If_/ChangeOrIfContinueToMultiContinueRector.php @@ -73,10 +73,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return null|If_[] */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if (!$this->ifManipulator->isIfWithOnly($node, \PhpParser\Node\Stmt\Continue_::class)) { return null; diff --git a/rules/EarlyReturn/Rector/If_/ChangeOrIfReturnToEarlyReturnRector.php b/rules/EarlyReturn/Rector/If_/ChangeOrIfReturnToEarlyReturnRector.php index 156f4d34173..e0722b45c38 100644 --- a/rules/EarlyReturn/Rector/If_/ChangeOrIfReturnToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/If_/ChangeOrIfReturnToEarlyReturnRector.php @@ -70,10 +70,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node * @return null|If_[] */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if (!$this->ifManipulator->isIfWithOnly($node, \PhpParser\Node\Stmt\Return_::class)) { return null; diff --git a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php index 56d1ecf8e75..df49265b0ad 100644 --- a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php +++ b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->doesLastStatementBreakFlow($node)) { return null; diff --git a/rules/EarlyReturn/Rector/Return_/PreparedValueToEarlyReturnRector.php b/rules/EarlyReturn/Rector/Return_/PreparedValueToEarlyReturnRector.php index ed4622ea7d2..f5872a57085 100644 --- a/rules/EarlyReturn/Rector/Return_/PreparedValueToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/Return_/PreparedValueToEarlyReturnRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $ifsBefore = $this->getIfsBefore($node); if ($this->shouldSkip($ifsBefore, $node->expr)) { diff --git a/rules/EarlyReturn/Rector/Return_/ReturnBinaryAndToEarlyReturnRector.php b/rules/EarlyReturn/Rector/Return_/ReturnBinaryAndToEarlyReturnRector.php index c3a5ddc9968..51aaf577b7c 100644 --- a/rules/EarlyReturn/Rector/Return_/ReturnBinaryAndToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/Return_/ReturnBinaryAndToEarlyReturnRector.php @@ -73,10 +73,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node * @return null|Node[] */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if (!$node->expr instanceof \PhpParser\Node\Expr\BinaryOp\BooleanAnd) { return null; diff --git a/rules/EarlyReturn/Rector/Return_/ReturnBinaryOrToEarlyReturnRector.php b/rules/EarlyReturn/Rector/Return_/ReturnBinaryOrToEarlyReturnRector.php index d2aa30eceea..ed47166a5e3 100644 --- a/rules/EarlyReturn/Rector/Return_/ReturnBinaryOrToEarlyReturnRector.php +++ b/rules/EarlyReturn/Rector/Return_/ReturnBinaryOrToEarlyReturnRector.php @@ -74,10 +74,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node * @return null|Node[] */ - public function refactor(\PhpParser\Node $node) : ?array + public function refactor($node) : ?array { if (!$node->expr instanceof \PhpParser\Node\Expr\BinaryOp\BooleanOr) { return null; diff --git a/rules/Generics/Rector/ClassMethod/GenericClassMethodParamRector.php b/rules/Generics/Rector/ClassMethod/GenericClassMethodParamRector.php index 7993436d1ca..e08908b619b 100644 --- a/rules/Generics/Rector/ClassMethod/GenericClassMethodParamRector.php +++ b/rules/Generics/Rector/ClassMethod/GenericClassMethodParamRector.php @@ -64,10 +64,10 @@ final class GenericClassMethodParamRector extends \Rector\Core\Rector\AbstractRe return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Stmt\ClassMethod|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { @@ -118,7 +118,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $makeClassMethodGenerics = $configuration[self::GENERIC_CLASS_METHOD_PARAMS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($makeClassMethodGenerics, \Rector\Generics\ValueObject\GenericClassMethodParam::class); diff --git a/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php b/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php index 595532a555c..65ebd58cf33 100644 --- a/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php +++ b/rules/MockeryToProphecy/Rector/ClassMethod/MockeryCreateMockToProphizeRector.php @@ -48,9 +48,9 @@ final class MockeryCreateMockToProphizeRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php b/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php index 3f5a4ad0cad..fb5ddeb91f2 100644 --- a/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php +++ b/rules/MockeryToProphecy/Rector/StaticCall/MockeryCloseRemoveRector.php @@ -32,9 +32,9 @@ final class MockeryCloseRemoveRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php b/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php index 457ccffe766..313ac2e0b72 100644 --- a/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php +++ b/rules/MysqlToMysqli/Rector/Assign/MysqlAssignToMysqliRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\FuncCall) { return null; diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php index f1665b35d5a..6b4141b9c01 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlFuncCallToMysqliRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\FuncCall + public function refactor($node) : ?\PhpParser\Node\Expr\FuncCall { if ($this->isName($node, 'mysql_create_db')) { return $this->processMysqlCreateDb($node); diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php index 237c566d8ff..c29ed35d051 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlPConnectToMysqliConnectRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'mysql_pconnect')) { return null; diff --git a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php index 433fef35ff7..06bb082359e 100644 --- a/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php +++ b/rules/MysqlToMysqli/Rector/FuncCall/MysqlQueryMysqlErrorWithLinkRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach (self::FUNCTION_RENAME_MAP as $oldFunction => $newFunction) { if (!$this->isName($node, $oldFunction)) { diff --git a/rules/Naming/Rector/Assign/RenameVariableToMatchMethodCallReturnTypeRector.php b/rules/Naming/Rector/Assign/RenameVariableToMatchMethodCallReturnTypeRector.php index 54a8ab5722c..07a31edc728 100644 --- a/rules/Naming/Rector/Assign/RenameVariableToMatchMethodCallReturnTypeRector.php +++ b/rules/Naming/Rector/Assign/RenameVariableToMatchMethodCallReturnTypeRector.php @@ -126,9 +126,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $variableAndCallAssign = $this->variableAndCallAssignMatcher->match($node); if (!$variableAndCallAssign instanceof \Rector\Naming\ValueObject\VariableAndCallAssign) { diff --git a/rules/Naming/Rector/ClassMethod/RenameParamToMatchTypeRector.php b/rules/Naming/Rector/ClassMethod/RenameParamToMatchTypeRector.php index 0097263683d..09cf8e4c281 100644 --- a/rules/Naming/Rector/ClassMethod/RenameParamToMatchTypeRector.php +++ b/rules/Naming/Rector/ClassMethod/RenameParamToMatchTypeRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->hasChanged = \false; foreach ($node->params as $param) { diff --git a/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php b/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php index 6e89d4ec541..e5d60034b06 100644 --- a/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php +++ b/rules/Naming/Rector/ClassMethod/RenameVariableToMatchNewTypeRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $hasChanged = \false; $assignsOfNew = $this->getAssignsOfNew($node); diff --git a/rules/Naming/Rector/Class_/RenamePropertyToMatchTypeRector.php b/rules/Naming/Rector/Class_/RenamePropertyToMatchTypeRector.php index 34960b690aa..aeb19cbff5d 100644 --- a/rules/Naming/Rector/Class_/RenamePropertyToMatchTypeRector.php +++ b/rules/Naming/Rector/Class_/RenamePropertyToMatchTypeRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Interface_::class]; } /** - * @param Class_|Interface_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->refactorClassProperties($node); $this->propertyPromotionRenamer->renamePropertyPromotion($node); diff --git a/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchExprVariableRector.php b/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchExprVariableRector.php index e5c33e532a7..4f69d68fb66 100644 --- a/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchExprVariableRector.php +++ b/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchExprVariableRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $isPropertyFetch = $this->propertyFetchAnalyzer->isPropertyFetch($node->expr); if (!$node->expr instanceof \PhpParser\Node\Expr\Variable && !$isPropertyFetch) { diff --git a/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchMethodCallReturnTypeRector.php b/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchMethodCallReturnTypeRector.php index dd05fa22d05..7dfafda66ff 100644 --- a/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchMethodCallReturnTypeRector.php +++ b/rules/Naming/Rector/Foreach_/RenameForeachValueVariableToMatchMethodCallReturnTypeRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $variableAndCallForeach = $this->foreachMatcher->match($node); if (!$variableAndCallForeach instanceof \Rector\Naming\ValueObject\VariableAndCallForeach) { diff --git a/rules/Order/Rector/Class_/OrderPrivateMethodsByUseRector.php b/rules/Order/Rector/Class_/OrderPrivateMethodsByUseRector.php index e0fd742b2ae..dc20014d177 100644 --- a/rules/Order/Rector/Class_/OrderPrivateMethodsByUseRector.php +++ b/rules/Order/Rector/Class_/OrderPrivateMethodsByUseRector.php @@ -80,9 +80,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Trait_::class]; } /** - * @param Class_|Trait_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $sortedAndOriginalClassMethods = $this->getSortedAndOriginalClassMethods($node); // order is correct, nothing to change diff --git a/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php b/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php index 7ff3bba97d9..de5f09ce7ad 100644 --- a/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php +++ b/rules/PSR4/Rector/FileWithoutNamespace/NormalizeNamespaceByPSR4ComposerAutoloadRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Namespace_::class, \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class]; } /** - * @param FileWithoutNamespace|Namespace_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $processNode = clone $node; if ($this->inlineHTMLAnalyzer->hasInlineHTML($processNode)) { diff --git a/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php b/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php index b50801654f8..85546843cc1 100644 --- a/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php +++ b/rules/PSR4/Rector/Namespace_/MultipleClassFileToPsr4ClassesRector.php @@ -80,9 +80,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Namespace_::class, \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class]; } /** - * @param Namespace_|FileWithoutNamespace $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->hasAtLeastTwoClassLikes($node)) { return null; diff --git a/rules/Php52/Rector/Property/VarToPublicPropertyRector.php b/rules/Php52/Rector/Property/VarToPublicPropertyRector.php index 11be35ad7fa..75b5603a55d 100644 --- a/rules/Php52/Rector/Property/VarToPublicPropertyRector.php +++ b/rules/Php52/Rector/Property/VarToPublicPropertyRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // explicitly public if ($node->flags !== 0) { diff --git a/rules/Php52/Rector/Switch_/ContinueToBreakInSwitchRector.php b/rules/Php52/Rector/Switch_/ContinueToBreakInSwitchRector.php index c0a684d7388..d41394c1e18 100644 --- a/rules/Php52/Rector/Switch_/ContinueToBreakInSwitchRector.php +++ b/rules/Php52/Rector/Switch_/ContinueToBreakInSwitchRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\Switch_ + public function refactor($node) : \PhpParser\Node\Stmt\Switch_ { foreach ($node->cases as $case) { foreach ($case->stmts as $key => $caseStmt) { diff --git a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php index 433696419b4..35819b28788 100644 --- a/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php +++ b/rules/Php53/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'dirname')) { return null; diff --git a/rules/Php53/Rector/Ternary/TernaryToElvisRector.php b/rules/Php53/Rector/Ternary/TernaryToElvisRector.php index f1a67feec3f..8a90a7b8450 100644 --- a/rules/Php53/Rector/Ternary/TernaryToElvisRector.php +++ b/rules/Php53/Rector/Ternary/TernaryToElvisRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeComparator->areNodesEqual($node->cond, $node->if)) { return null; diff --git a/rules/Php53/Rector/Variable/ReplaceHttpServerVarsByServerRector.php b/rules/Php53/Rector/Variable/ReplaceHttpServerVarsByServerRector.php index fe644a9f42b..82e5de5dbf1 100644 --- a/rules/Php53/Rector/Variable/ReplaceHttpServerVarsByServerRector.php +++ b/rules/Php53/Rector/Variable/ReplaceHttpServerVarsByServerRector.php @@ -36,9 +36,9 @@ final class ReplaceHttpServerVarsByServerRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\Variable::class]; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach (self::VARIABLE_RENAME_MAP as $oldName => $newName) { if (!$this->isName($node, $oldName)) { diff --git a/rules/Php54/Rector/Break_/RemoveZeroBreakContinueRector.php b/rules/Php54/Rector/Break_/RemoveZeroBreakContinueRector.php index 1dbbdfd5e4f..02dd2507a12 100644 --- a/rules/Php54/Rector/Break_/RemoveZeroBreakContinueRector.php +++ b/rules/Php54/Rector/Break_/RemoveZeroBreakContinueRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Break_::class, \PhpParser\Node\Stmt\Continue_::class]; } /** - * @param Break_|Continue_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->num === null) { return null; diff --git a/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php b/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php index 862c634076a..d8333d2f305 100644 --- a/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php +++ b/rules/Php54/Rector/FuncCall/RemoveReferenceFromCallRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { foreach ($node->args as $nodeArg) { if (!$nodeArg instanceof \PhpParser\Node\Arg) { diff --git a/rules/Php55/Rector/Class_/ClassConstantToSelfClassRector.php b/rules/Php55/Rector/Class_/ClassConstantToSelfClassRector.php index c55122aacde..9fe89710908 100644 --- a/rules/Php55/Rector/Class_/ClassConstantToSelfClassRector.php +++ b/rules/Php55/Rector/Class_/ClassConstantToSelfClassRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\MagicConst\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\ClassConstFetch + public function refactor($node) : \PhpParser\Node\Expr\ClassConstFetch { return $this->nodeFactory->createSelfFetchConstant('class', $node); } diff --git a/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php b/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php index 7bbc54c1de0..125d69244af 100644 --- a/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php +++ b/rules/Php55/Rector/FuncCall/PregReplaceEModifierRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'preg_replace')) { return null; diff --git a/rules/Php55/Rector/String_/StringClassNameToClassConstantRector.php b/rules/Php55/Rector/String_/StringClassNameToClassConstantRector.php index 1aad77f6916..233a39a2ecd 100644 --- a/rules/Php55/Rector/String_/StringClassNameToClassConstantRector.php +++ b/rules/Php55/Rector/String_/StringClassNameToClassConstantRector.php @@ -87,9 +87,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLikeName = $node->value; // remove leading slash @@ -106,7 +106,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $classesToSkip = $configuration[self::CLASSES_TO_SKIP] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($classesToSkip); diff --git a/rules/Php56/Rector/FuncCall/PowToExpRector.php b/rules/Php56/Rector/FuncCall/PowToExpRector.php index 408a2fa6673..21cfb924777 100644 --- a/rules/Php56/Rector/FuncCall/PowToExpRector.php +++ b/rules/Php56/Rector/FuncCall/PowToExpRector.php @@ -39,9 +39,9 @@ final class PowToExpRector extends \Rector\Core\Rector\AbstractRector implements return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'pow')) { return null; diff --git a/rules/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php b/rules/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php index 1871d6edfa4..ae287113b19 100644 --- a/rules/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php +++ b/rules/Php56/Rector/FunctionLike/AddDefaultValueForUndefinedVariableRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->inlineHTMLAnalyzer->hasInlineHTML($node)) { return null; diff --git a/rules/Php70/Rector/Assign/ListSplitStringRector.php b/rules/Php70/Rector/Assign/ListSplitStringRector.php index 865d9ee29dc..86d56b98837 100644 --- a/rules/Php70/Rector/Assign/ListSplitStringRector.php +++ b/rules/Php70/Rector/Assign/ListSplitStringRector.php @@ -36,9 +36,9 @@ final class ListSplitStringRector extends \Rector\Core\Rector\AbstractRector imp return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\List_) { return null; diff --git a/rules/Php70/Rector/Assign/ListSwapArrayOrderRector.php b/rules/Php70/Rector/Assign/ListSwapArrayOrderRector.php index 27ed7623ba1..31f1c9a0898 100644 --- a/rules/Php70/Rector/Assign/ListSwapArrayOrderRector.php +++ b/rules/Php70/Rector/Assign/ListSwapArrayOrderRector.php @@ -32,9 +32,9 @@ final class ListSwapArrayOrderRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipAssign($node)) { return null; diff --git a/rules/Php70/Rector/Break_/BreakNotInLoopOrSwitchToReturnRector.php b/rules/Php70/Rector/Break_/BreakNotInLoopOrSwitchToReturnRector.php index fbd88351427..bdb4e3f4fac 100644 --- a/rules/Php70/Rector/Break_/BreakNotInLoopOrSwitchToReturnRector.php +++ b/rules/Php70/Rector/Break_/BreakNotInLoopOrSwitchToReturnRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Break_::class]; } /** - * @param Break_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->contextAnalyzer->isInLoop($node)) { return null; diff --git a/rules/Php70/Rector/ClassMethod/Php4ConstructorRector.php b/rules/Php70/Rector/ClassMethod/Php4ConstructorRector.php index 8e644831205..2b78e410d5f 100644 --- a/rules/Php70/Rector/ClassMethod/Php4ConstructorRector.php +++ b/rules/Php70/Rector/ClassMethod/Php4ConstructorRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->php4ConstructorClassMethodAnalyzer->detect($node)) { return null; diff --git a/rules/Php70/Rector/FuncCall/CallUserMethodRector.php b/rules/Php70/Rector/FuncCall/CallUserMethodRector.php index 3c45ea21a5b..15ace73c484 100644 --- a/rules/Php70/Rector/FuncCall/CallUserMethodRector.php +++ b/rules/Php70/Rector/FuncCall/CallUserMethodRector.php @@ -36,9 +36,9 @@ final class CallUserMethodRector extends \Rector\Core\Rector\AbstractRector impl return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldFunctionNames = \array_keys(self::OLD_TO_NEW_FUNCTIONS); if (!$this->isNames($node, $oldFunctionNames)) { diff --git a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php index b9866eb57af..fff7c558afa 100644 --- a/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php +++ b/rules/Php70/Rector/FuncCall/EregToPregMatchRector.php @@ -64,9 +64,9 @@ final class EregToPregMatchRector extends \Rector\Core\Rector\AbstractRector imp return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php index 1d5b8c0a683..179d3a49c47 100644 --- a/rules/Php70/Rector/FuncCall/MultiDirnameRector.php +++ b/rules/Php70/Rector/FuncCall/MultiDirnameRector.php @@ -37,9 +37,9 @@ final class MultiDirnameRector extends \Rector\Core\Rector\AbstractRector implem return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->nestingLevel = 0; if (!$this->isName($node, self::DIRNAME)) { diff --git a/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php b/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php index 85c373f0515..56a95e0f9a7 100644 --- a/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php +++ b/rules/Php70/Rector/FuncCall/NonVariableToVariableOnFunctionCallRector.php @@ -87,9 +87,9 @@ final class NonVariableToVariableOnFunctionCallRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $arguments = $this->getNonVariableArguments($node); if ($arguments === []) { diff --git a/rules/Php70/Rector/FuncCall/RandomFunctionRector.php b/rules/Php70/Rector/FuncCall/RandomFunctionRector.php index 78f9fff740b..48bcfa84c9b 100644 --- a/rules/Php70/Rector/FuncCall/RandomFunctionRector.php +++ b/rules/Php70/Rector/FuncCall/RandomFunctionRector.php @@ -34,9 +34,9 @@ final class RandomFunctionRector extends \Rector\Core\Rector\AbstractRector impl return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Expr\FuncCall + public function refactor($node) : \PhpParser\Node\Expr\FuncCall { foreach (self::OLD_TO_NEW_FUNCTION_NAMES as $oldFunctionName => $newFunctionName) { if ($this->isName($node, $oldFunctionName)) { diff --git a/rules/Php70/Rector/FuncCall/RenameMktimeWithoutArgsToTimeRector.php b/rules/Php70/Rector/FuncCall/RenameMktimeWithoutArgsToTimeRector.php index 4af156c62ae..da7e7eb0e43 100644 --- a/rules/Php70/Rector/FuncCall/RenameMktimeWithoutArgsToTimeRector.php +++ b/rules/Php70/Rector/FuncCall/RenameMktimeWithoutArgsToTimeRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'mktime')) { return null; diff --git a/rules/Php70/Rector/FunctionLike/ExceptionHandlerTypehintRector.php b/rules/Php70/Rector/FunctionLike/ExceptionHandlerTypehintRector.php index 6ba3d171aaa..ccae072d9f5 100644 --- a/rules/Php70/Rector/FunctionLike/ExceptionHandlerTypehintRector.php +++ b/rules/Php70/Rector/FunctionLike/ExceptionHandlerTypehintRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param Function_|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // exception handle has 1 param exactly if (\count($node->params) !== 1) { diff --git a/rules/Php70/Rector/If_/IfToSpaceshipRector.php b/rules/Php70/Rector/If_/IfToSpaceshipRector.php index 1744d4adcb1..35f77b8fe0e 100644 --- a/rules/Php70/Rector/If_/IfToSpaceshipRector.php +++ b/rules/Php70/Rector/If_/IfToSpaceshipRector.php @@ -89,9 +89,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->cond instanceof \PhpParser\Node\Expr\BinaryOp\Equal && !$node->cond instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return null; diff --git a/rules/Php70/Rector/List_/EmptyListRector.php b/rules/Php70/Rector/List_/EmptyListRector.php index 2a264ce2971..9dcf59aa512 100644 --- a/rules/Php70/Rector/List_/EmptyListRector.php +++ b/rules/Php70/Rector/List_/EmptyListRector.php @@ -40,9 +40,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\List_::class]; } /** - * @param List_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->items as $item) { if ($item !== null) { diff --git a/rules/Php70/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php b/rules/Php70/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php index f6c76e203e9..9fe58af2f54 100644 --- a/rules/Php70/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php +++ b/rules/Php70/Rector/MethodCall/ThisCallOnStaticMethodToStaticCallRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\Variable) { return null; diff --git a/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php b/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php index ca835e99cbc..5152121c4b4 100644 --- a/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php +++ b/rules/Php70/Rector/StaticCall/StaticCallOnNonStaticToInstanceCallRector.php @@ -106,9 +106,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->name instanceof \PhpParser\Node\Expr) { return null; diff --git a/rules/Php70/Rector/Switch_/ReduceMultipleDefaultSwitchRector.php b/rules/Php70/Rector/Switch_/ReduceMultipleDefaultSwitchRector.php index b1de63c3bbd..f7e3b5fa753 100644 --- a/rules/Php70/Rector/Switch_/ReduceMultipleDefaultSwitchRector.php +++ b/rules/Php70/Rector/Switch_/ReduceMultipleDefaultSwitchRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $defaultCases = []; foreach ($node->cases as $case) { diff --git a/rules/Php70/Rector/Ternary/TernaryToNullCoalescingRector.php b/rules/Php70/Rector/Ternary/TernaryToNullCoalescingRector.php index 9a81bc2c2b9..28a938db995 100644 --- a/rules/Php70/Rector/Ternary/TernaryToNullCoalescingRector.php +++ b/rules/Php70/Rector/Ternary/TernaryToNullCoalescingRector.php @@ -32,9 +32,9 @@ final class TernaryToNullCoalescingRector extends \Rector\Core\Rector\AbstractRe return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->cond instanceof \PhpParser\Node\Expr\Isset_) { return $this->processTernaryWithIsset($node, $node->cond); diff --git a/rules/Php70/Rector/Ternary/TernaryToSpaceshipRector.php b/rules/Php70/Rector/Ternary/TernaryToSpaceshipRector.php index 8bb7a553c3f..d42dd0a1171 100644 --- a/rules/Php70/Rector/Ternary/TernaryToSpaceshipRector.php +++ b/rules/Php70/Rector/Ternary/TernaryToSpaceshipRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php70/Rector/Variable/WrapVariableVariableNameInCurlyBracesRector.php b/rules/Php70/Rector/Variable/WrapVariableVariableNameInCurlyBracesRector.php index 6036033f703..3db1291a41c 100644 --- a/rules/Php70/Rector/Variable/WrapVariableVariableNameInCurlyBracesRector.php +++ b/rules/Php70/Rector/Variable/WrapVariableVariableNameInCurlyBracesRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Variable::class]; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $nodeName = $node->name; if (!$nodeName instanceof \PhpParser\Node\Expr\PropertyFetch && !$nodeName instanceof \PhpParser\Node\Expr\Variable) { diff --git a/rules/Php71/Rector/Assign/AssignArrayToStringRector.php b/rules/Php71/Rector/Assign/AssignArrayToStringRector.php index e98a103bfb8..752b16d662a 100644 --- a/rules/Php71/Rector/Assign/AssignArrayToStringRector.php +++ b/rules/Php71/Rector/Assign/AssignArrayToStringRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class, \PhpParser\Node\Stmt\Property::class]; } /** - * @param Assign|Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $defaultExpr = $this->resolveDefaultValueExpr($node); if (!$defaultExpr instanceof \PhpParser\Node\Expr) { diff --git a/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php b/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php index b9be1c634eb..44ec6dd4671 100644 --- a/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php +++ b/rules/Php71/Rector/BinaryOp/BinaryOpBetweenNumberAndStringRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp::class]; } /** - * @param BinaryOp $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BinaryOp\Concat) { return null; diff --git a/rules/Php71/Rector/BooleanOr/IsIterableRector.php b/rules/Php71/Rector/BooleanOr/IsIterableRector.php index 0668e1109b9..af9c5c5c51a 100644 --- a/rules/Php71/Rector/BooleanOr/IsIterableRector.php +++ b/rules/Php71/Rector/BooleanOr/IsIterableRector.php @@ -49,9 +49,9 @@ final class IsIterableRector extends \Rector\Core\Rector\AbstractRector implemen return [\PhpParser\Node\Expr\BinaryOp\BooleanOr::class]; } /** - * @param BooleanOr $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip()) { return null; diff --git a/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php b/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php index e05b1251cf7..bdf55099c5e 100644 --- a/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php +++ b/rules/Php71/Rector/ClassConst/PublicConstantVisibilityRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // already non-public if (!$node->isPublic()) { diff --git a/rules/Php71/Rector/FuncCall/CountOnNullRector.php b/rules/Php71/Rector/FuncCall/CountOnNullRector.php index 051fa054e71..fc5b9a381fc 100644 --- a/rules/Php71/Rector/FuncCall/CountOnNullRector.php +++ b/rules/Php71/Rector/FuncCall/CountOnNullRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php b/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php index 93754737797..f1105e5e7f4 100644 --- a/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php +++ b/rules/Php71/Rector/FuncCall/RemoveExtraParametersRector.php @@ -59,9 +59,9 @@ final class RemoveExtraParametersRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php71/Rector/List_/ListToArrayDestructRector.php b/rules/Php71/Rector/List_/ListToArrayDestructRector.php index 109828c4edc..732c66ebb0b 100644 --- a/rules/Php71/Rector/List_/ListToArrayDestructRector.php +++ b/rules/Php71/Rector/List_/ListToArrayDestructRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\List_::class]; } /** - * @param List_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parentNode = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if ($parentNode instanceof \PhpParser\Node\Expr\Assign && $parentNode->var === $node) { diff --git a/rules/Php71/Rector/Name/ReservedObjectRector.php b/rules/Php71/Rector/Name/ReservedObjectRector.php index 364f40ccdc2..23b22e6e87e 100644 --- a/rules/Php71/Rector/Name/ReservedObjectRector.php +++ b/rules/Php71/Rector/Name/ReservedObjectRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Identifier::class, \PhpParser\Node\Name::class]; } /** - * @param Identifier|Name $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Identifier) { return $this->processIdentifier($node); @@ -69,7 +69,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $reservedKeywordsToReplacements = $configuration[self::RESERVED_KEYWORDS_TO_REPLACEMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($reservedKeywordsToReplacements); diff --git a/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php b/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php index 8f2e6eff351..74e31e8d1f9 100644 --- a/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php +++ b/rules/Php71/Rector/TryCatch/MultiExceptionCatchRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\TryCatch::class]; } /** - * @param TryCatch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->catches) < 2) { return null; diff --git a/rules/Php72/Rector/Assign/ListEachRector.php b/rules/Php72/Rector/Assign/ListEachRector.php index 844a3a55f7e..c3f5976c767 100644 --- a/rules/Php72/Rector/Assign/ListEachRector.php +++ b/rules/Php72/Rector/Assign/ListEachRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php index 59d070667ec..9c3f2f6677e 100644 --- a/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php +++ b/rules/Php72/Rector/Assign/ReplaceEachAssignmentWithKeyCurrentRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php b/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php index 01f0a47d65e..bb03d72f154 100644 --- a/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php +++ b/rules/Php72/Rector/FuncCall/CreateFunctionToAnonymousFunctionRector.php @@ -96,10 +96,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node * @return Closure|null */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'create_function')) { return null; diff --git a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php index 50251861160..ca82468ee1e 100644 --- a/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php +++ b/rules/Php72/Rector/FuncCall/GetClassOnNullRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'get_class')) { return null; diff --git a/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php b/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php index c1ce40d791b..0dbcf254b54 100644 --- a/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php +++ b/rules/Php72/Rector/FuncCall/IsObjectOnIncompleteClassRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'is_object')) { return null; diff --git a/rules/Php72/Rector/FuncCall/ParseStrWithResultArgumentRector.php b/rules/Php72/Rector/FuncCall/ParseStrWithResultArgumentRector.php index 0ed966fc376..2002d14a892 100644 --- a/rules/Php72/Rector/FuncCall/ParseStrWithResultArgumentRector.php +++ b/rules/Php72/Rector/FuncCall/ParseStrWithResultArgumentRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'parse_str')) { return null; diff --git a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php index ebc194d6449..c15806c14be 100644 --- a/rules/Php72/Rector/FuncCall/StringifyDefineRector.php +++ b/rules/Php72/Rector/FuncCall/StringifyDefineRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'define')) { return null; diff --git a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php index e4fad0df9b6..0c705c9304e 100644 --- a/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php +++ b/rules/Php72/Rector/FuncCall/StringsAssertNakedRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'assert')) { return null; diff --git a/rules/Php72/Rector/Unset_/UnsetCastRector.php b/rules/Php72/Rector/Unset_/UnsetCastRector.php index 42519a58afb..fbe60d3046c 100644 --- a/rules/Php72/Rector/Unset_/UnsetCastRector.php +++ b/rules/Php72/Rector/Unset_/UnsetCastRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Cast\Unset_::class, \PhpParser\Node\Expr\Assign::class]; } /** - * @param Unset_|Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\Assign) { if ($node->expr instanceof \PhpParser\Node\Expr\Cast\Unset_) { diff --git a/rules/Php72/Rector/While_/WhileEachToForeachRector.php b/rules/Php72/Rector/While_/WhileEachToForeachRector.php index dcb4651e621..e1813f7dfb3 100644 --- a/rules/Php72/Rector/While_/WhileEachToForeachRector.php +++ b/rules/Php72/Rector/While_/WhileEachToForeachRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\While_::class]; } /** - * @param While_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->cond instanceof \PhpParser\Node\Expr\Assign) { return null; diff --git a/rules/Php73/Rector/BooleanOr/IsCountableRector.php b/rules/Php73/Rector/BooleanOr/IsCountableRector.php index 1dd1ce8436f..25e0cdff908 100644 --- a/rules/Php73/Rector/BooleanOr/IsCountableRector.php +++ b/rules/Php73/Rector/BooleanOr/IsCountableRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\BooleanOr::class]; } /** - * @param BooleanOr $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip()) { return null; diff --git a/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php b/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php index 44ff6accb03..b0b1b23f362 100644 --- a/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php +++ b/rules/Php73/Rector/ConstFetch/SensitiveConstantNameRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $constantName = $this->getName($node); if ($constantName === null) { diff --git a/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php b/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php index 6e5e99a742f..2b20b24be1e 100644 --- a/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php +++ b/rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php b/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php index c8561d55403..6a3daf47b3d 100644 --- a/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php +++ b/rules/Php73/Rector/FuncCall/JsonThrowOnErrorRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php73/Rector/FuncCall/RegexDashEscapeRector.php b/rules/Php73/Rector/FuncCall/RegexDashEscapeRector.php index fd64be29e05..3dd2ec890d9 100644 --- a/rules/Php73/Rector/FuncCall/RegexDashEscapeRector.php +++ b/rules/Php73/Rector/FuncCall/RegexDashEscapeRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param FuncCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $regexArguments = $this->regexPatternArgumentManipulator->matchCallArgumentWithRegexPattern($node); if ($regexArguments === []) { diff --git a/rules/Php73/Rector/FuncCall/SensitiveDefineRector.php b/rules/Php73/Rector/FuncCall/SensitiveDefineRector.php index 22232440541..81f3c90662c 100644 --- a/rules/Php73/Rector/FuncCall/SensitiveDefineRector.php +++ b/rules/Php73/Rector/FuncCall/SensitiveDefineRector.php @@ -39,9 +39,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'define')) { return null; diff --git a/rules/Php73/Rector/FuncCall/SetCookieRector.php b/rules/Php73/Rector/FuncCall/SetCookieRector.php index b7ab2d6dd44..6cb6efa0162 100644 --- a/rules/Php73/Rector/FuncCall/SetCookieRector.php +++ b/rules/Php73/Rector/FuncCall/SetCookieRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php b/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php index efe430d038c..da0deab3c8d 100644 --- a/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php +++ b/rules/Php73/Rector/FuncCall/StringifyStrNeedlesRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node, self::NEEDLE_STRING_SENSITIVE_FUNCTIONS)) { return null; diff --git a/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php b/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php index b92a40aa2bb..7938f58d1df 100644 --- a/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php +++ b/rules/Php73/Rector/String_/SensitiveHereNowDocRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $kind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if (!\in_array($kind, [\PhpParser\Node\Scalar\String_::KIND_HEREDOC, \PhpParser\Node\Scalar\String_::KIND_NOWDOC], \true)) { diff --git a/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php b/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php index b72f56a6fd1..545dbb7e540 100644 --- a/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php +++ b/rules/Php74/Rector/ArrayDimFetch/CurlyToSquareBracketArrayStringRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->followedByCurlyBracketAnalyzer->isFollowed($this->file, $node)) { return null; diff --git a/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php b/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php index 7f0dd2b8ac6..4181706e932 100644 --- a/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php +++ b/rules/Php74/Rector/Assign/NullCoalescingOperatorRector.php @@ -38,9 +38,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\AssignOp\Coalesce + public function refactor($node) : ?\PhpParser\Node\Expr\AssignOp\Coalesce { if (!$node->expr instanceof \PhpParser\Node\Expr\BinaryOp\Coalesce) { return null; diff --git a/rules/Php74/Rector/Closure/ClosureToArrowFunctionRector.php b/rules/Php74/Rector/Closure/ClosureToArrowFunctionRector.php index 7c0859a8328..490c38a3bd7 100644 --- a/rules/Php74/Rector/Closure/ClosureToArrowFunctionRector.php +++ b/rules/Php74/Rector/Closure/ClosureToArrowFunctionRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Closure::class]; } /** - * @param Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $returnExpr = $this->closureArrowFunctionAnalyzer->matchArrowFunctionExpr($node); if (!$returnExpr instanceof \PhpParser\Node\Expr) { diff --git a/rules/Php74/Rector/Double/RealToFloatTypeCastRector.php b/rules/Php74/Rector/Double/RealToFloatTypeCastRector.php index 9990a426f2f..cb7d8517033 100644 --- a/rules/Php74/Rector/Double/RealToFloatTypeCastRector.php +++ b/rules/Php74/Rector/Double/RealToFloatTypeCastRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Cast\Double::class]; } /** - * @param Double $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $kind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if ($kind !== \PhpParser\Node\Expr\Cast\Double::KIND_REAL) { diff --git a/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php b/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php index 89614d59a0f..7d2c1545afa 100644 --- a/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php +++ b/rules/Php74/Rector/FuncCall/ArrayKeyExistsOnPropertyRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'array_key_exists')) { return null; diff --git a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php index 024c34457bc..664439ce9f5 100644 --- a/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php +++ b/rules/Php74/Rector/FuncCall/ArraySpreadInsteadOfArrayMergeRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isName($node, 'array_merge')) { return $this->refactorArray($node); diff --git a/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php b/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php index 58651107161..f34c60b0bf2 100644 --- a/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php +++ b/rules/Php74/Rector/FuncCall/FilterVarToAddSlashesRector.php @@ -43,9 +43,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'filter_var')) { return null; diff --git a/rules/Php74/Rector/FuncCall/GetCalledClassToStaticClassRector.php b/rules/Php74/Rector/FuncCall/GetCalledClassToStaticClassRector.php index bd451531ff2..f8faad4e93e 100644 --- a/rules/Php74/Rector/FuncCall/GetCalledClassToStaticClassRector.php +++ b/rules/Php74/Rector/FuncCall/GetCalledClassToStaticClassRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'get_called_class')) { return null; diff --git a/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php b/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php index b5b137e28d7..d91192e08a5 100644 --- a/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php +++ b/rules/Php74/Rector/FuncCall/MbStrrposEncodingArgumentPositionRector.php @@ -36,9 +36,9 @@ final class MbStrrposEncodingArgumentPositionRector extends \Rector\Core\Rector\ return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'mb_strrpos')) { return null; diff --git a/rules/Php74/Rector/LNumber/AddLiteralSeparatorToNumberRector.php b/rules/Php74/Rector/LNumber/AddLiteralSeparatorToNumberRector.php index b9549076487..83619dd3fe3 100644 --- a/rules/Php74/Rector/LNumber/AddLiteralSeparatorToNumberRector.php +++ b/rules/Php74/Rector/LNumber/AddLiteralSeparatorToNumberRector.php @@ -47,7 +47,7 @@ final class AddLiteralSeparatorToNumberRector extends \Rector\Core\Rector\Abstra /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $limitValue = $configuration[self::LIMIT_VALUE] ?? self::DEFAULT_LIMIT_VALUE; \RectorPrefix20211210\Webmozart\Assert\Assert::integer($limitValue); @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\LNumber::class, \PhpParser\Node\Scalar\DNumber::class]; } /** - * @param LNumber|DNumber $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $numericValueAsString = (string) $node->value; if ($this->shouldSkip($node, $numericValueAsString)) { diff --git a/rules/Php74/Rector/MethodCall/ChangeReflectionTypeToStringToGetNameRector.php b/rules/Php74/Rector/MethodCall/ChangeReflectionTypeToStringToGetNameRector.php index 2cfe12043b8..f5dd586980d 100644 --- a/rules/Php74/Rector/MethodCall/ChangeReflectionTypeToStringToGetNameRector.php +++ b/rules/Php74/Rector/MethodCall/ChangeReflectionTypeToStringToGetNameRector.php @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\Cast\String_::class]; } /** - * @param MethodCall|String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\MethodCall) { return $this->refactorMethodCall($node); diff --git a/rules/Php74/Rector/Property/RestoreDefaultNullToNullableTypePropertyRector.php b/rules/Php74/Rector/Property/RestoreDefaultNullToNullableTypePropertyRector.php index e8a88b0315b..7115ee81066 100644 --- a/rules/Php74/Rector/Property/RestoreDefaultNullToNullableTypePropertyRector.php +++ b/rules/Php74/Rector/Property/RestoreDefaultNullToNullableTypePropertyRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php74/Rector/Property/TypedPropertyRector.php b/rules/Php74/Rector/Property/TypedPropertyRector.php index 66800af6fcd..2a25ec6928a 100644 --- a/rules/Php74/Rector/Property/TypedPropertyRector.php +++ b/rules/Php74/Rector/Property/TypedPropertyRector.php @@ -162,9 +162,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipProperty($node)) { return null; @@ -201,7 +201,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $this->classLikeTypeOnly = $configuration[self::CLASS_LIKE_TYPE_ONLY] ?? \false; $this->privatePropertyOnly = $configuration[self::PRIVATE_PROPERTY_ONLY] ?? \false; diff --git a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php index b21948b59a0..3452f7717f9 100644 --- a/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php +++ b/rules/Php74/Rector/StaticCall/ExportToReflectionFunctionRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->class instanceof \PhpParser\Node\Name) { return null; diff --git a/rules/Php80/Rector/Catch_/RemoveUnusedVariableInCatchRector.php b/rules/Php80/Rector/Catch_/RemoveUnusedVariableInCatchRector.php index 4fa7e2b8b56..f37d2f7c05b 100644 --- a/rules/Php80/Rector/Catch_/RemoveUnusedVariableInCatchRector.php +++ b/rules/Php80/Rector/Catch_/RemoveUnusedVariableInCatchRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Catch_::class]; } /** - * @param Catch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $caughtVar = $node->var; if (!$caughtVar instanceof \PhpParser\Node\Expr\Variable) { diff --git a/rules/Php80/Rector/ClassMethod/AddParamBasedOnParentClassMethodRector.php b/rules/Php80/Rector/ClassMethod/AddParamBasedOnParentClassMethodRector.php index a9d8487ddd7..95e0448f024 100644 --- a/rules/Php80/Rector/ClassMethod/AddParamBasedOnParentClassMethodRector.php +++ b/rules/Php80/Rector/ClassMethod/AddParamBasedOnParentClassMethodRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->nodeNameResolver->isName($node, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { return null; diff --git a/rules/Php80/Rector/ClassMethod/FinalPrivateToPrivateVisibilityRector.php b/rules/Php80/Rector/ClassMethod/FinalPrivateToPrivateVisibilityRector.php index d936197df22..6c4bf7944e3 100644 --- a/rules/Php80/Rector/ClassMethod/FinalPrivateToPrivateVisibilityRector.php +++ b/rules/Php80/Rector/ClassMethod/FinalPrivateToPrivateVisibilityRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php b/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php index 8359c93fb75..9391f1da5fc 100644 --- a/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php +++ b/rules/Php80/Rector/ClassMethod/OptionalParametersAfterRequiredRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\New_::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param ClassMethod|New_|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $isAlreadySorted = (bool) $node->getAttribute(self::ALREADY_SORTED, \false); if ($isAlreadySorted) { diff --git a/rules/Php80/Rector/ClassMethod/SetStateToStaticRector.php b/rules/Php80/Rector/ClassMethod/SetStateToStaticRector.php index 5b25d689d00..fcf63424025 100644 --- a/rules/Php80/Rector/ClassMethod/SetStateToStaticRector.php +++ b/rules/Php80/Rector/ClassMethod/SetStateToStaticRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php index f2ed760a7ef..e5d37051945 100644 --- a/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php +++ b/rules/Php80/Rector/Class_/AnnotationToAttributeRector.php @@ -110,9 +110,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Param::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param Class_|Property|Param|ClassMethod|Function_|Closure|ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { @@ -132,7 +132,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $annotationsToAttributes = $configuration[self::ANNOTATION_TO_ATTRIBUTE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($annotationsToAttributes, \Rector\Php80\ValueObject\AnnotationToAttribute::class); diff --git a/rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php b/rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php index bba6339577d..e64d752374b 100644 --- a/rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php +++ b/rules/Php80/Rector/Class_/ClassPropertyAssignToConstructorPromotionRector.php @@ -106,9 +106,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $promotionCandidates = $this->promotedPropertyCandidateResolver->resolveFromClass($node); if ($promotionCandidates === []) { diff --git a/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php b/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php index fd8cf37e964..5b383244872 100644 --- a/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php +++ b/rules/Php80/Rector/Class_/DoctrineAnnotationClassToAttributeRector.php @@ -122,9 +122,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { @@ -165,7 +165,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $shouldRemoveAnnotations = $configuration[self::REMOVE_ANNOTATIONS] ?? \true; \RectorPrefix20211210\Webmozart\Assert\Assert::boolean($shouldRemoveAnnotations); diff --git a/rules/Php80/Rector/Class_/StringableForToStringRector.php b/rules/Php80/Rector/Class_/StringableForToStringRector.php index 3ff1cf3e99f..615402b5765 100644 --- a/rules/Php80/Rector/Class_/StringableForToStringRector.php +++ b/rules/Php80/Rector/Class_/StringableForToStringRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $toStringClassMethod = $node->getMethod(\Rector\Core\ValueObject\MethodName::TO_STRING); if (!$toStringClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { diff --git a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php index 64bcfdeaadc..4e2a4334162 100644 --- a/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php +++ b/rules/Php80/Rector/FuncCall/ClassOnObjectRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeNameResolver->isName($node, 'get_class')) { return null; diff --git a/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php b/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php index aa4b6da3b5b..87abc107be5 100644 --- a/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php +++ b/rules/Php80/Rector/FuncCall/Php8ResourceReturnToObjectRector.php @@ -119,9 +119,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BinaryOp\BooleanOr::class]; } /** - * @param FuncCall|BooleanOr $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->resourceReturnToObject->refactor($node, self::COLLECTION_FUNCTION_TO_RETURN_OBJECT); } diff --git a/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php b/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php index c7bf60d6e1d..7d72ec35f93 100644 --- a/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php +++ b/rules/Php80/Rector/FuncCall/TokenGetAllToObjectRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeNameResolver->isName($node, 'token_get_all')) { return null; diff --git a/rules/Php80/Rector/FunctionLike/UnionTypesRector.php b/rules/Php80/Rector/FunctionLike/UnionTypesRector.php index 04919f8941c..6e19cc697df 100644 --- a/rules/Php80/Rector/FunctionLike/UnionTypesRector.php +++ b/rules/Php80/Rector/FunctionLike/UnionTypesRector.php @@ -100,9 +100,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param ClassMethod | Function_ | Closure | ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->hasChanged = \false; $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); diff --git a/rules/Php80/Rector/Identical/StrEndsWithRector.php b/rules/Php80/Rector/Identical/StrEndsWithRector.php index f54adb53747..d597d9b161e 100644 --- a/rules/Php80/Rector/Identical/StrEndsWithRector.php +++ b/rules/Php80/Rector/Identical/StrEndsWithRector.php @@ -104,9 +104,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->refactorSubstr($node) ?? $this->refactorSubstrCompare($node); } diff --git a/rules/Php80/Rector/Identical/StrStartsWithRector.php b/rules/Php80/Rector/Identical/StrStartsWithRector.php index cd1d373dc26..8e948481254 100644 --- a/rules/Php80/Rector/Identical/StrStartsWithRector.php +++ b/rules/Php80/Rector/Identical/StrStartsWithRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->strStartWithMatchAndRefactors as $strStartWithMatchAndRefactor) { $strStartsWithValueObject = $strStartWithMatchAndRefactor->match($node); diff --git a/rules/Php80/Rector/NotIdentical/StrContainsRector.php b/rules/Php80/Rector/NotIdentical/StrContainsRector.php index 09ce788e48c..fc79d4c18e6 100644 --- a/rules/Php80/Rector/NotIdentical/StrContainsRector.php +++ b/rules/Php80/Rector/NotIdentical/StrContainsRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $funcCall = $this->matchIdenticalOrNotIdenticalToFalse($node); if (!$funcCall instanceof \PhpParser\Node\Expr\FuncCall) { diff --git a/rules/Php80/Rector/Switch_/ChangeSwitchToMatchRector.php b/rules/Php80/Rector/Switch_/ChangeSwitchToMatchRector.php index 7330873fc5d..e993968177b 100644 --- a/rules/Php80/Rector/Switch_/ChangeSwitchToMatchRector.php +++ b/rules/Php80/Rector/Switch_/ChangeSwitchToMatchRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Switch_::class]; } /** - * @param Switch_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $condAndExprs = $this->switchExprsResolver->resolve($node); if ($this->matchSwitchAnalyzer->shouldSkipSwitch($node, $condAndExprs)) { diff --git a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php index a50f84001ac..023e97c5b9b 100644 --- a/rules/Php80/Rector/Ternary/GetDebugTypeRector.php +++ b/rules/Php80/Rector/Ternary/GetDebugTypeRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php b/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php index c389ccb6e29..3a610ea475d 100644 --- a/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php +++ b/rules/Php81/Rector/ClassConst/FinalizePublicClassConstantRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->isPrivate()) { return null; diff --git a/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php b/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php index 1aee60993a6..6ab3a39ac5e 100644 --- a/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php +++ b/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { return null; diff --git a/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php b/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php index 51a2427f34b..e3cd50f0180 100644 --- a/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php +++ b/rules/Php81/Rector/Class_/MyCLabsClassToEnumRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('MyCLabs\\Enum\\Enum'))) { return null; diff --git a/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php b/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php index 3622329774f..549c8a3ba95 100644 --- a/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php +++ b/rules/Php81/Rector/Class_/SpatieEnumClassToEnumRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Spatie\\Enum\\Enum'))) { return null; diff --git a/rules/Php81/Rector/FuncCall/Php81ResourceReturnToObjectRector.php b/rules/Php81/Rector/FuncCall/Php81ResourceReturnToObjectRector.php index cdb393c97a5..b61ba41d0af 100644 --- a/rules/Php81/Rector/FuncCall/Php81ResourceReturnToObjectRector.php +++ b/rules/Php81/Rector/FuncCall/Php81ResourceReturnToObjectRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BinaryOp\BooleanOr::class]; } /** - * @param FuncCall|BooleanOr $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { return $this->resourceReturnToObject->refactor($node, self::COLLECTION_FUNCTION_TO_RETURN_OBJECT); } diff --git a/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php b/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php index 7969d012f72..5c0d7f070ec 100644 --- a/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php +++ b/rules/Php81/Rector/FunctionLike/IntersectionTypesRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ArrowFunction::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class]; } /** - * @param ArrowFunction|Closure|ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php b/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php index b906769d11c..cf780849cd4 100644 --- a/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php +++ b/rules/Php81/Rector/MethodCall/MyCLabsMethodCallToEnumConstRector.php @@ -38,9 +38,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('MyCLabs\\Enum\\Enum'))) { return null; diff --git a/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php b/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php index 77875c8b08b..2e4b74d5a4e 100644 --- a/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php +++ b/rules/Php81/Rector/Property/ReadOnlyPropertyRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Param::class]; } /** - * @param Property|Param $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Param) { return $this->refactorParam($node); diff --git a/rules/PhpSpecToPHPUnit/Rector/AbstractPhpSpecToPHPUnitRector.php b/rules/PhpSpecToPHPUnit/Rector/AbstractPhpSpecToPHPUnitRector.php index b6d8ef8efcf..64515033c95 100644 --- a/rules/PhpSpecToPHPUnit/Rector/AbstractPhpSpecToPHPUnitRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/AbstractPhpSpecToPHPUnitRector.php @@ -53,7 +53,10 @@ class OrderSpec extends ObjectBehavior CODE_SAMPLE )]); } - protected function isInPhpSpecBehavior(\PhpParser\Node $node) : bool + /** + * @param \PhpParser\Node $node + */ + protected function isInPhpSpecBehavior($node) : bool { if ($node instanceof \PhpParser\Node\Stmt\ClassLike) { return $this->isObjectType($node, new \PHPStan\Type\ObjectType('PhpSpec\\ObjectBehavior')); diff --git a/rules/PhpSpecToPHPUnit/Rector/ClassMethod/PhpSpecMethodToPHPUnitMethodRector.php b/rules/PhpSpecToPHPUnit/Rector/ClassMethod/PhpSpecMethodToPHPUnitMethodRector.php index ad48c5c7894..1d08951bb27 100644 --- a/rules/PhpSpecToPHPUnit/Rector/ClassMethod/PhpSpecMethodToPHPUnitMethodRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/ClassMethod/PhpSpecMethodToPHPUnitMethodRector.php @@ -45,9 +45,9 @@ final class PhpSpecMethodToPHPUnitMethodRector extends \Rector\PhpSpecToPHPUnit\ return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isInPhpSpecBehavior($node)) { return null; diff --git a/rules/PhpSpecToPHPUnit/Rector/Class_/AddMockPropertiesRector.php b/rules/PhpSpecToPHPUnit/Rector/Class_/AddMockPropertiesRector.php index ca4919211cc..9025fe939f5 100644 --- a/rules/PhpSpecToPHPUnit/Rector/Class_/AddMockPropertiesRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/Class_/AddMockPropertiesRector.php @@ -38,9 +38,9 @@ final class AddMockPropertiesRector extends \Rector\PhpSpecToPHPUnit\Rector\Abst return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isInPhpSpecBehavior($node)) { return null; diff --git a/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php b/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php index bbf1b0fefc3..f67a5d8f98b 100644 --- a/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php @@ -67,9 +67,9 @@ final class PhpSpecClassToPHPUnitClassRector extends \Rector\PhpSpecToPHPUnit\Re return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isInPhpSpecBehavior($node)) { return null; diff --git a/rules/PhpSpecToPHPUnit/Rector/Class_/RenameSpecFileToTestFileRector.php b/rules/PhpSpecToPHPUnit/Rector/Class_/RenameSpecFileToTestFileRector.php index 192c6ee66af..0dfbbd6fe9f 100644 --- a/rules/PhpSpecToPHPUnit/Rector/Class_/RenameSpecFileToTestFileRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/Class_/RenameSpecFileToTestFileRector.php @@ -45,9 +45,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $smartFileInfo = $this->file->getSmartFileInfo(); $oldPathname = $smartFileInfo->getPathname(); diff --git a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php index e5bbacc34bf..499a65cd3b8 100644 --- a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecMocksToPHPUnitMocksRector.php @@ -54,9 +54,9 @@ final class PhpSpecMocksToPHPUnitMocksRector extends \Rector\PhpSpecToPHPUnit\Re return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param ClassMethod|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isInPhpSpecBehavior($node)) { return null; diff --git a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php index f3b4ec8b60f..c8c76025ef6 100644 --- a/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php @@ -130,9 +130,9 @@ final class PhpSpecPromisesToPHPUnitAssertRector extends \Rector\PhpSpecToPHPUni return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->isPrepared = \false; $this->matchersKeys = []; diff --git a/rules/PhpSpecToPHPUnit/Rector/Variable/MockVariableToPropertyFetchRector.php b/rules/PhpSpecToPHPUnit/Rector/Variable/MockVariableToPropertyFetchRector.php index a61b2b7c194..e3e2615cbf0 100644 --- a/rules/PhpSpecToPHPUnit/Rector/Variable/MockVariableToPropertyFetchRector.php +++ b/rules/PhpSpecToPHPUnit/Rector/Variable/MockVariableToPropertyFetchRector.php @@ -35,9 +35,9 @@ final class MockVariableToPropertyFetchRector extends \Rector\PhpSpecToPHPUnit\R return [\PhpParser\Node\Expr\Variable::class]; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $class = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$class instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php b/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php index 0281fe8bce8..c8fbf6fa5e5 100644 --- a/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php +++ b/rules/Privatization/Rector/ClassMethod/PrivatizeFinalClassMethodRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Privatization/Rector/Class_/ChangeGlobalVariablesToPropertiesRector.php b/rules/Privatization/Rector/Class_/ChangeGlobalVariablesToPropertiesRector.php index 8500a4ee40f..893ef1f0152 100644 --- a/rules/Privatization/Rector/Class_/ChangeGlobalVariablesToPropertiesRector.php +++ b/rules/Privatization/Rector/Class_/ChangeGlobalVariablesToPropertiesRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->getMethods() as $classMethod) { $this->collectGlobalVariableNamesAndRefactorToPropertyFetch($node, $classMethod); diff --git a/rules/Privatization/Rector/Class_/ChangeLocalPropertyToVariableRector.php b/rules/Privatization/Rector/Class_/ChangeLocalPropertyToVariableRector.php index 10cc396cddf..1f4d9d75a3c 100644 --- a/rules/Privatization/Rector/Class_/ChangeLocalPropertyToVariableRector.php +++ b/rules/Privatization/Rector/Class_/ChangeLocalPropertyToVariableRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->classAnalyzer->isAnonymousClass($node)) { return null; diff --git a/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php b/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php index 2f060b215da..3fe148625c2 100644 --- a/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php +++ b/rules/Privatization/Rector/Class_/ChangeReadOnlyVariableWithDefaultValueToConstantRector.php @@ -99,9 +99,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $readOnlyVariableAssigns = $this->collectReadOnlyVariableAssigns($node); $readOnlyVariableAssigns = $this->filterOutUniqueNames($readOnlyVariableAssigns); diff --git a/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php b/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php index e735b362910..779f07a0e67 100644 --- a/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php +++ b/rules/Privatization/Rector/Class_/FinalizeClassesWithoutChildrenRector.php @@ -87,9 +87,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClass($node)) { return null; diff --git a/rules/Privatization/Rector/Class_/RepeatedLiteralToClassConstantRector.php b/rules/Privatization/Rector/Class_/RepeatedLiteralToClassConstantRector.php index 7b8ef1bfb97..b3848b29768 100644 --- a/rules/Privatization/Rector/Class_/RepeatedLiteralToClassConstantRector.php +++ b/rules/Privatization/Rector/Class_/RepeatedLiteralToClassConstantRector.php @@ -102,9 +102,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // skip tests, where string values are often used as fixtures if ($this->isName($node, '*Test')) { diff --git a/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php b/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php index d957be68d4a..d701c9a8d20 100644 --- a/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php +++ b/rules/Privatization/Rector/MethodCall/PrivatizeLocalGetterToPropertyRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\Variable) { return null; diff --git a/rules/Privatization/Rector/MethodCall/ReplaceStringWithClassConstantRector.php b/rules/Privatization/Rector/MethodCall/ReplaceStringWithClassConstantRector.php index cd20cef6815..930f41c3d28 100644 --- a/rules/Privatization/Rector/MethodCall/ReplaceStringWithClassConstantRector.php +++ b/rules/Privatization/Rector/MethodCall/ReplaceStringWithClassConstantRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->args === []) { return null; @@ -94,7 +94,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $this->replaceStringWithClassConstants = $configuration[self::REPLACE_STRING_WITH_CLASS_CONSTANT] ?? $configuration; } diff --git a/rules/Privatization/Rector/Property/ChangeReadOnlyPropertyWithDefaultValueToConstantRector.php b/rules/Privatization/Rector/Property/ChangeReadOnlyPropertyWithDefaultValueToConstantRector.php index 661c267b65f..2a685478588 100644 --- a/rules/Privatization/Rector/Property/ChangeReadOnlyPropertyWithDefaultValueToConstantRector.php +++ b/rules/Privatization/Rector/Property/ChangeReadOnlyPropertyWithDefaultValueToConstantRector.php @@ -90,9 +90,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php b/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php index 12aeefd8d73..56308d15d9e 100644 --- a/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php +++ b/rules/Privatization/Rector/Property/PrivatizeFinalClassPropertyRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { diff --git a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php index 9dd595bccb6..25decefc1a0 100644 --- a/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php +++ b/rules/Removing/Rector/ClassMethod/ArgumentRemoverRector.php @@ -49,10 +49,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param MethodCall|StaticCall|ClassMethod $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall|\PhpParser\Node\Stmt\ClassMethod */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { foreach ($this->removedArguments as $removedArgument) { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, $removedArgument->getObjectType())) { @@ -68,7 +68,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $removedArguments = $configuration[self::REMOVED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($removedArguments, \Rector\Removing\ValueObject\ArgumentRemover::class); diff --git a/rules/Removing/Rector/Class_/RemoveInterfacesRector.php b/rules/Removing/Rector/Class_/RemoveInterfacesRector.php index dfb89298c98..3ddb0fb9125 100644 --- a/rules/Removing/Rector/Class_/RemoveInterfacesRector.php +++ b/rules/Removing/Rector/Class_/RemoveInterfacesRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->implements === []) { return null; @@ -63,7 +63,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $interfacesToRemove = $configuration[self::INTERFACES_TO_REMOVE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString($interfacesToRemove); diff --git a/rules/Removing/Rector/Class_/RemoveParentRector.php b/rules/Removing/Rector/Class_/RemoveParentRector.php index 5775f85b79e..06c17b58e69 100644 --- a/rules/Removing/Rector/Class_/RemoveParentRector.php +++ b/rules/Removing/Rector/Class_/RemoveParentRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); $parentClassReflection = $this->parentClassScopeResolver->resolveParentClassReflection($scope); @@ -81,7 +81,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $parentTypesToRemove = $configuration[self::PARENT_TYPES_TO_REMOVE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($parentTypesToRemove); diff --git a/rules/Removing/Rector/Class_/RemoveTraitUseRector.php b/rules/Removing/Rector/Class_/RemoveTraitUseRector.php index 6e5d47f9542..48b361f35cc 100644 --- a/rules/Removing/Rector/Class_/RemoveTraitUseRector.php +++ b/rules/Removing/Rector/Class_/RemoveTraitUseRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Trait_::class]; } /** - * @param Class_|Trait_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->classHasChanged = \false; foreach ($node->getTraitUses() as $traitUse) { @@ -77,7 +77,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $traitsToRemove = $configuration[self::TRAITS_TO_REMOVE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString($traitsToRemove); diff --git a/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php b/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php index 224fefc8087..38a5f2e8bea 100644 --- a/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php +++ b/rules/Removing/Rector/FuncCall/RemoveFuncCallArgRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->name instanceof \PhpParser\Node\Expr) { return null; @@ -67,7 +67,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $removedFunctionArguments = $configuration[self::REMOVED_FUNCTION_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($removedFunctionArguments, \Rector\Removing\ValueObject\RemoveFuncCallArg::class); diff --git a/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php b/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php index 4eb441d5f45..25a338503d0 100644 --- a/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php +++ b/rules/Removing/Rector/FuncCall/RemoveFuncCallRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->removeFuncCalls as $removeFuncCall) { if (!$this->isName($node, $removeFuncCall->getFuncCall())) { @@ -75,7 +75,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $removeFuncCalls = $configuration[self::REMOVE_FUNC_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($removeFuncCalls, \Rector\Removing\ValueObject\RemoveFuncCall::class); diff --git a/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php b/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php index 1641a8e0564..3fb805f4cdc 100644 --- a/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php +++ b/rules/RemovingStatic/Rector/ClassMethod/LocallyCalledStaticMethodToNonStaticRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param ClassMethod|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassMethod) { if (!$node->isPrivate()) { diff --git a/rules/RemovingStatic/Rector/Class_/DesiredClassTypeToDynamicRector.php b/rules/RemovingStatic/Rector/Class_/DesiredClassTypeToDynamicRector.php index cfb2ac755fd..938b271a814 100644 --- a/rules/RemovingStatic/Rector/Class_/DesiredClassTypeToDynamicRector.php +++ b/rules/RemovingStatic/Rector/Class_/DesiredClassTypeToDynamicRector.php @@ -118,9 +118,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->staticObjectTypes as $staticObjectType) { // do not any dependencies to class itself diff --git a/rules/RemovingStatic/Rector/Property/DesiredPropertyClassMethodTypeToDynamicRector.php b/rules/RemovingStatic/Rector/Property/DesiredPropertyClassMethodTypeToDynamicRector.php index 05e071edf11..5e83ed0b205 100644 --- a/rules/RemovingStatic/Rector/Property/DesiredPropertyClassMethodTypeToDynamicRector.php +++ b/rules/RemovingStatic/Rector/Property/DesiredPropertyClassMethodTypeToDynamicRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param Property|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Scope $scope */ $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); diff --git a/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php b/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php index 64ca55c702c..31ef3fc819d 100644 --- a/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php +++ b/rules/RemovingStatic/Rector/StaticCall/DesiredStaticCallTypeToDynamicRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->staticObjectTypes as $staticObjectType) { if (!$this->isObjectType($node->class, $staticObjectType)) { diff --git a/rules/RemovingStatic/Rector/StaticPropertyFetch/DesiredStaticPropertyFetchTypeToDynamicRector.php b/rules/RemovingStatic/Rector/StaticPropertyFetch/DesiredStaticPropertyFetchTypeToDynamicRector.php index 4dfdf5c1c3c..6c346c33611 100644 --- a/rules/RemovingStatic/Rector/StaticPropertyFetch/DesiredStaticPropertyFetchTypeToDynamicRector.php +++ b/rules/RemovingStatic/Rector/StaticPropertyFetch/DesiredStaticPropertyFetchTypeToDynamicRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticPropertyFetch::class]; } /** - * @param StaticPropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Scope $scope */ $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); diff --git a/rules/Renaming/Rector/ClassConstFetch/RenameClassConstFetchRector.php b/rules/Renaming/Rector/ClassConstFetch/RenameClassConstFetchRector.php index 73516cac8bf..efce8787ee3 100644 --- a/rules/Renaming/Rector/ClassConstFetch/RenameClassConstFetchRector.php +++ b/rules/Renaming/Rector/ClassConstFetch/RenameClassConstFetchRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ClassConstFetch::class]; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\ClassConstFetch + public function refactor($node) : ?\PhpParser\Node\Expr\ClassConstFetch { foreach ($this->renameClassConstFetches as $renameClassConstFetch) { if (!$this->isObjectType($node->class, $renameClassConstFetch->getOldObjectType())) { @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $renameClassConstFetches = $configuration[self::CLASS_CONSTANT_RENAME] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($renameClassConstFetches, \Rector\Renaming\Contract\RenameClassConstFetchInterface::class); diff --git a/rules/Renaming/Rector/ClassMethod/RenameAnnotationRector.php b/rules/Renaming/Rector/ClassMethod/RenameAnnotationRector.php index 3192a8729d8..e31c33ea7e3 100644 --- a/rules/Renaming/Rector/ClassMethod/RenameAnnotationRector.php +++ b/rules/Renaming/Rector/ClassMethod/RenameAnnotationRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\Expression::class]; } /** - * @param ClassMethod|Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { @@ -97,7 +97,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $renamedAnnotations = $configuration[self::RENAMED_ANNOTATIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($renamedAnnotations); diff --git a/rules/Renaming/Rector/ConstFetch/RenameConstantRector.php b/rules/Renaming/Rector/ConstFetch/RenameConstantRector.php index 10efff178b2..7948d02558f 100644 --- a/rules/Renaming/Rector/ConstFetch/RenameConstantRector.php +++ b/rules/Renaming/Rector/ConstFetch/RenameConstantRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->oldToNewConstants as $oldConstant => $newConstant) { if (!$this->isName($node->name, $oldConstant)) { @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewConstants = $configuration[self::OLD_TO_NEW_CONSTANTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($oldToNewConstants)); diff --git a/rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php b/rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php index 7ef2ff32b13..fd1cd0b5633 100644 --- a/rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php +++ b/rules/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class, \PhpParser\Node\Stmt\Namespace_::class]; } /** - * @param Namespace_|FileWithoutNamespace $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->newNamespace = null; if ($node instanceof \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace) { @@ -101,7 +101,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $namespacePrefixesWithExcludedClasses = $configuration[self::NAMESPACE_PREFIXES_WITH_EXCLUDED_CLASSES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($namespacePrefixesWithExcludedClasses, \Rector\Renaming\ValueObject\PseudoNamespaceToNamespace::class); diff --git a/rules/Renaming/Rector/FuncCall/RenameFunctionRector.php b/rules/Renaming/Rector/FuncCall/RenameFunctionRector.php index 437608d630e..eebdabbefbf 100644 --- a/rules/Renaming/Rector/FuncCall/RenameFunctionRector.php +++ b/rules/Renaming/Rector/FuncCall/RenameFunctionRector.php @@ -39,9 +39,9 @@ final class RenameFunctionRector extends \Rector\Core\Rector\AbstractRector impl return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->oldFunctionToNewFunction as $oldFunction => $newFunction) { if (!$this->isName($node, $oldFunction)) { @@ -60,7 +60,7 @@ final class RenameFunctionRector extends \Rector\Core\Rector\AbstractRector impl /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldFunctionToNewFunction = $configuration[self::OLD_FUNCTION_TO_NEW_FUNCTION] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($oldFunctionToNewFunction); diff --git a/rules/Renaming/Rector/MethodCall/RenameMethodRector.php b/rules/Renaming/Rector/MethodCall/RenameMethodRector.php index b5de222d345..95e8e5683d9 100644 --- a/rules/Renaming/Rector/MethodCall/RenameMethodRector.php +++ b/rules/Renaming/Rector/MethodCall/RenameMethodRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param MethodCall|StaticCall|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodCallRenames as $methodCallRename) { $implementsInterface = $this->classManipulator->hasParentMethodOrInterface($methodCallRename->getObjectType(), $methodCallRename->getOldMethod(), $methodCallRename->getNewMethod()); @@ -99,7 +99,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallRenames = $configuration[self::METHOD_CALL_RENAMES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($methodCallRenames, \Rector\Renaming\Contract\MethodCallRenameInterface::class); diff --git a/rules/Renaming/Rector/Name/RenameClassRector.php b/rules/Renaming/Rector/Name/RenameClassRector.php index 20741b2f78f..425428098c8 100644 --- a/rules/Renaming/Rector/Name/RenameClassRector.php +++ b/rules/Renaming/Rector/Name/RenameClassRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Name::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\FunctionLike::class, \PhpParser\Node\Stmt\Expression::class, \PhpParser\Node\Stmt\ClassLike::class, \PhpParser\Node\Stmt\Namespace_::class, \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class, \PhpParser\Node\Stmt\Use_::class]; } /** - * @param FunctionLike|Name|ClassLike|Expression|Namespace_|Property|FileWithoutNamespace|Use_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldToNewClasses = $this->renamedClassesDataCollector->getOldToNewClasses(); if (!$node instanceof \PhpParser\Node\Stmt\Use_) { @@ -98,7 +98,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewClasses = $configuration[self::OLD_TO_NEW_CLASSES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($oldToNewClasses); diff --git a/rules/Renaming/Rector/Namespace_/RenameNamespaceRector.php b/rules/Renaming/Rector/Namespace_/RenameNamespaceRector.php index 31f118d2244..182c565c0d2 100644 --- a/rules/Renaming/Rector/Namespace_/RenameNamespaceRector.php +++ b/rules/Renaming/Rector/Namespace_/RenameNamespaceRector.php @@ -58,9 +58,9 @@ final class RenameNamespaceRector extends \Rector\Core\Rector\AbstractRector imp return [\PhpParser\Node\Stmt\Namespace_::class, \PhpParser\Node\Stmt\Use_::class, \PhpParser\Node\Name::class]; } /** - * @param Namespace_|Use_|Name $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $name = $this->getName($node); if ($name === null) { @@ -100,7 +100,7 @@ final class RenameNamespaceRector extends \Rector\Core\Rector\AbstractRector imp /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewNamespaces = $configuration[self::OLD_TO_NEW_NAMESPACES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($oldToNewNamespaces)); diff --git a/rules/Renaming/Rector/PropertyFetch/RenamePropertyRector.php b/rules/Renaming/Rector/PropertyFetch/RenamePropertyRector.php index c3172689a74..7f964af5fe0 100644 --- a/rules/Renaming/Rector/PropertyFetch/RenamePropertyRector.php +++ b/rules/Renaming/Rector/PropertyFetch/RenamePropertyRector.php @@ -44,9 +44,9 @@ final class RenamePropertyRector extends \Rector\Core\Rector\AbstractRector impl return [\PhpParser\Node\Expr\PropertyFetch::class, \PhpParser\Node\Stmt\ClassLike::class]; } /** - * @param PropertyFetch|ClassLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassLike) { return $this->processFromClassLike($node); @@ -56,7 +56,7 @@ final class RenamePropertyRector extends \Rector\Core\Rector\AbstractRector impl /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $renamedProperties = $configuration[self::RENAMED_PROPERTIES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($renamedProperties, \Rector\Renaming\ValueObject\RenameProperty::class); diff --git a/rules/Renaming/Rector/StaticCall/RenameStaticMethodRector.php b/rules/Renaming/Rector/StaticCall/RenameStaticMethodRector.php index a74e46a707c..a96d251e6be 100644 --- a/rules/Renaming/Rector/StaticCall/RenameStaticMethodRector.php +++ b/rules/Renaming/Rector/StaticCall/RenameStaticMethodRector.php @@ -39,9 +39,9 @@ final class RenameStaticMethodRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->staticMethodRenames as $staticMethodRename) { if (!$this->isObjectType($node->class, $staticMethodRename->getOldObjectType())) { @@ -57,7 +57,7 @@ final class RenameStaticMethodRector extends \Rector\Core\Rector\AbstractRector /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewMethodsByClasses = $configuration[self::OLD_TO_NEW_METHODS_BY_CLASSES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($oldToNewMethodsByClasses, \Rector\Renaming\ValueObject\RenameStaticMethod::class); diff --git a/rules/Renaming/Rector/String_/RenameStringRector.php b/rules/Renaming/Rector/String_/RenameStringRector.php index 3c83d136309..c15f656a1aa 100644 --- a/rules/Renaming/Rector/String_/RenameStringRector.php +++ b/rules/Renaming/Rector/String_/RenameStringRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->stringChanges as $oldValue => $newValue) { if (!$this->valueResolver->isValue($node, $oldValue)) { @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $stringChanges = $configuration[self::STRING_CHANGES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($stringChanges); diff --git a/rules/Restoration/Rector/ClassConstFetch/MissingClassConstantReferenceToStringRector.php b/rules/Restoration/Rector/ClassConstFetch/MissingClassConstantReferenceToStringRector.php index 17846e7ec14..34293d2fa45 100644 --- a/rules/Restoration/Rector/ClassConstFetch/MissingClassConstantReferenceToStringRector.php +++ b/rules/Restoration/Rector/ClassConstFetch/MissingClassConstantReferenceToStringRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\ClassConstFetch::class]; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'class')) { return null; diff --git a/rules/Restoration/Rector/ClassLike/UpdateFileNameByClassNameFileSystemRector.php b/rules/Restoration/Rector/ClassLike/UpdateFileNameByClassNameFileSystemRector.php index 5007ab02b5f..c61502c66df 100644 --- a/rules/Restoration/Rector/ClassLike/UpdateFileNameByClassNameFileSystemRector.php +++ b/rules/Restoration/Rector/ClassLike/UpdateFileNameByClassNameFileSystemRector.php @@ -38,9 +38,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassLike::class]; } /** - * @param ClassLike $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $className = $this->getName($node); if ($className === null) { diff --git a/rules/Restoration/Rector/Class_/RemoveFinalFromEntityRector.php b/rules/Restoration/Rector/Class_/RemoveFinalFromEntityRector.php index 39d25446119..8de85646ce2 100644 --- a/rules/Restoration/Rector/Class_/RemoveFinalFromEntityRector.php +++ b/rules/Restoration/Rector/Class_/RemoveFinalFromEntityRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); if (!$phpDocInfo->hasByAnnotationClasses(['Doctrine\\ORM\\Mapping\\Entity', 'Doctrine\\ORM\\Mapping\\Embeddable'])) { diff --git a/rules/Restoration/Rector/Namespace_/CompleteImportForPartialAnnotationRector.php b/rules/Restoration/Rector/Namespace_/CompleteImportForPartialAnnotationRector.php index f8f9d0f4ae8..7c01fee415a 100644 --- a/rules/Restoration/Rector/Namespace_/CompleteImportForPartialAnnotationRector.php +++ b/rules/Restoration/Rector/Namespace_/CompleteImportForPartialAnnotationRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Namespace_::class]; } /** - * @param Namespace_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $class = $this->betterNodeFinder->findFirstInstanceOf($node->stmts, \PhpParser\Node\Stmt\Class_::class); if (!$class instanceof \PhpParser\Node\Stmt\Class_) { @@ -84,7 +84,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $useImportsToRestore = $configuration[self::USE_IMPORTS_TO_RESTORE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($useImportsToRestore, \Rector\Restoration\ValueObject\CompleteImportForPartialAnnotation::class); diff --git a/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php b/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php index 2b8d53c9b8e..83fbe002b41 100644 --- a/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php +++ b/rules/Restoration/Rector/Property/MakeTypedPropertyNullableIfCheckedRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipProperty($node)) { return null; diff --git a/rules/Strict/Rector/AbstractFalsyScalarRuleFixerRector.php b/rules/Strict/Rector/AbstractFalsyScalarRuleFixerRector.php index 2fc0838b87b..3a483bc9abb 100644 --- a/rules/Strict/Rector/AbstractFalsyScalarRuleFixerRector.php +++ b/rules/Strict/Rector/AbstractFalsyScalarRuleFixerRector.php @@ -23,7 +23,7 @@ abstract class AbstractFalsyScalarRuleFixerRector extends \Rector\Core\Rector\Ab /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $treatAsNonEmpty = $configuration[self::TREAT_AS_NON_EMPTY] ?? \false; \RectorPrefix20211210\Webmozart\Assert\Assert::boolean($treatAsNonEmpty); diff --git a/rules/Strict/Rector/BooleanNot/BooleanInBooleanNotRuleFixerRector.php b/rules/Strict/Rector/BooleanNot/BooleanInBooleanNotRuleFixerRector.php index 7516199ec9e..fcbc7417a7a 100644 --- a/rules/Strict/Rector/BooleanNot/BooleanInBooleanNotRuleFixerRector.php +++ b/rules/Strict/Rector/BooleanNot/BooleanInBooleanNotRuleFixerRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param BooleanNot $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr + public function refactor($node) : ?\PhpParser\Node\Expr { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php b/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php index 4645c59a6d8..e0d4d026c52 100644 --- a/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php +++ b/rules/Strict/Rector/Empty_/DisallowedEmptyRuleFixerRector.php @@ -58,10 +58,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Empty_::class, \PhpParser\Node\Expr\BooleanNot::class]; } /** - * @param Empty_|BooleanNot $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Expr|null */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Strict/Rector/If_/BooleanInIfConditionRuleFixerRector.php b/rules/Strict/Rector/If_/BooleanInIfConditionRuleFixerRector.php index 9266a395610..75be709dde0 100644 --- a/rules/Strict/Rector/If_/BooleanInIfConditionRuleFixerRector.php +++ b/rules/Strict/Rector/If_/BooleanInIfConditionRuleFixerRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\If_::class]; } /** - * @param If_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Stmt\If_ + public function refactor($node) : ?\PhpParser\Node\Stmt\If_ { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Strict/Rector/Ternary/BooleanInTernaryOperatorRuleFixerRector.php b/rules/Strict/Rector/Ternary/BooleanInTernaryOperatorRuleFixerRector.php index f64b3e4a92e..7a92d59a8ce 100644 --- a/rules/Strict/Rector/Ternary/BooleanInTernaryOperatorRuleFixerRector.php +++ b/rules/Strict/Rector/Ternary/BooleanInTernaryOperatorRuleFixerRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\Ternary + public function refactor($node) : ?\PhpParser\Node\Expr\Ternary { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Strict/Rector/Ternary/DisallowedShortTernaryRuleFixerRector.php b/rules/Strict/Rector/Ternary/DisallowedShortTernaryRuleFixerRector.php index b22620288ec..5b85257862c 100644 --- a/rules/Strict/Rector/Ternary/DisallowedShortTernaryRuleFixerRector.php +++ b/rules/Strict/Rector/Ternary/DisallowedShortTernaryRuleFixerRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Ternary::class]; } /** - * @param Ternary $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\Ternary + public function refactor($node) : ?\PhpParser\Node\Expr\Ternary { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/rules/Transform/Rector/Assign/DimFetchAssignToMethodCallRector.php b/rules/Transform/Rector/Assign/DimFetchAssignToMethodCallRector.php index 6c032e78650..6e3902504bd 100644 --- a/rules/Transform/Rector/Assign/DimFetchAssignToMethodCallRector.php +++ b/rules/Transform/Rector/Assign/DimFetchAssignToMethodCallRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\ArrayDimFetch) { return null; @@ -89,7 +89,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $dimFetchAssignToMethodCalls = $configuration[self::DIM_FETCH_ASSIGN_TO_METHOD_CALL] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($dimFetchAssignToMethodCalls, \Rector\Transform\ValueObject\DimFetchAssignToMethodCall::class); diff --git a/rules/Transform/Rector/Assign/GetAndSetToMethodCallRector.php b/rules/Transform/Rector/Assign/GetAndSetToMethodCallRector.php index 107e379471e..edcd7b3d731 100644 --- a/rules/Transform/Rector/Assign/GetAndSetToMethodCallRector.php +++ b/rules/Transform/Rector/Assign/GetAndSetToMethodCallRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param Assign|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\Assign) { if ($node->var instanceof \PhpParser\Node\Expr\PropertyFetch) { @@ -83,7 +83,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $getAndSetToMethodCalls = $configuration[self::TYPE_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($getAndSetToMethodCalls, \Rector\Transform\ValueObject\GetAndSetToMethodCall::class); diff --git a/rules/Transform/Rector/Assign/PropertyAssignToMethodCallRector.php b/rules/Transform/Rector/Assign/PropertyAssignToMethodCallRector.php index 4a40bb56067..91197df91e3 100644 --- a/rules/Transform/Rector/Assign/PropertyAssignToMethodCallRector.php +++ b/rules/Transform/Rector/Assign/PropertyAssignToMethodCallRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\PropertyFetch) { return null; @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $propertyAssignsToMethodCalls = $configuration[self::PROPERTY_ASSIGNS_TO_METHODS_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($propertyAssignsToMethodCalls, \Rector\Transform\ValueObject\PropertyAssignToMethodCall::class); diff --git a/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php b/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php index c6b64992d9d..271aaa4dac1 100644 --- a/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php +++ b/rules/Transform/Rector/Assign/PropertyFetchToMethodCallRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch|Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\Assign && $node->var instanceof \PhpParser\Node\Expr\PropertyFetch) { return $this->processSetter($node); @@ -67,7 +67,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $propertiesToMethodCalls = $configuration[self::PROPERTIES_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($propertiesToMethodCalls, \Rector\Transform\ValueObject\PropertyFetchToMethodCall::class); diff --git a/rules/Transform/Rector/Attribute/AttributeKeyToClassConstFetchRector.php b/rules/Transform/Rector/Attribute/AttributeKeyToClassConstFetchRector.php index 91ecafb4aca..02d34d4e64d 100644 --- a/rules/Transform/Rector/Attribute/AttributeKeyToClassConstFetchRector.php +++ b/rules/Transform/Rector/Attribute/AttributeKeyToClassConstFetchRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Attribute::class]; } /** - * @param Attribute $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->attributeKeysToClassConstFetches as $attributeKeyToClassConstFetch) { if (!$this->isName($node->name, $attributeKeyToClassConstFetch->getAttributeClass())) { @@ -89,7 +89,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $attributeKeysToClassConstFetches = $configuration[self::ATTRIBUTE_KEYS_TO_CLASS_CONST_FETCHES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($attributeKeysToClassConstFetches, \Rector\Transform\ValueObject\AttributeKeyToClassConstFetch::class); diff --git a/rules/Transform/Rector/ClassMethod/SingleToManyMethodRector.php b/rules/Transform/Rector/ClassMethod/SingleToManyMethodRector.php index 3756f947fad..bdf8800aa5d 100644 --- a/rules/Transform/Rector/ClassMethod/SingleToManyMethodRector.php +++ b/rules/Transform/Rector/ClassMethod/SingleToManyMethodRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { @@ -100,7 +100,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $singleToManyMethods = $configuration[self::SINGLES_TO_MANY_METHODS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($singleToManyMethods, \Rector\Transform\ValueObject\SingleToManyMethod::class); diff --git a/rules/Transform/Rector/ClassMethod/WrapReturnRector.php b/rules/Transform/Rector/ClassMethod/WrapReturnRector.php index a7ccc6a22d7..edd25d2467d 100644 --- a/rules/Transform/Rector/ClassMethod/WrapReturnRector.php +++ b/rules/Transform/Rector/ClassMethod/WrapReturnRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->typeMethodWraps as $typeMethodWrap) { if (!$this->isObjectType($node, $typeMethodWrap->getObjectType())) { @@ -79,7 +79,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $typeMethodWraps = $configuration[self::TYPE_METHOD_WRAPS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($typeMethodWraps, \Rector\Transform\ValueObject\WrapReturn::class); diff --git a/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php b/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php index a20ba432a8a..d945492e32d 100644 --- a/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php +++ b/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php @@ -86,16 +86,19 @@ CODE_SAMPLE { return [\PhpParser\Node\Stmt\Class_::class]; } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { $transformOnNamespaces = $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString($transformOnNamespaces); $this->transformOnNamespaces = $transformOnNamespaces; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php b/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php index 18fbb3472df..f0f78cda78e 100644 --- a/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php +++ b/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Scope $scope */ $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); @@ -82,7 +82,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $interfaceByParent = $configuration[self::INTERFACE_BY_PARENT] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($interfaceByParent); diff --git a/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php b/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php index b808cda269f..5cd5ed72593 100644 --- a/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php +++ b/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var Scope $scope */ $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); @@ -79,7 +79,7 @@ CODE_SAMPLE * @todo complex configuration, introduce value object! * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $interfaceByTrait = $configuration[self::INTERFACE_BY_TRAIT] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($interfaceByTrait); diff --git a/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php b/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php index 65e1dfb0865..c3b48f6df14 100644 --- a/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php +++ b/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->classAnalyzer->isAnonymousClass($node)) { return null; diff --git a/rules/Transform/Rector/Class_/MergeInterfacesRector.php b/rules/Transform/Rector/Class_/MergeInterfacesRector.php index ae480ba1ec8..953ada820af 100644 --- a/rules/Transform/Rector/Class_/MergeInterfacesRector.php +++ b/rules/Transform/Rector/Class_/MergeInterfacesRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->implements === []) { return null; @@ -73,7 +73,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewInterfaces = $configuration[self::OLD_TO_NEW_INTERFACES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($oldToNewInterfaces); diff --git a/rules/Transform/Rector/Class_/ParentClassToTraitsRector.php b/rules/Transform/Rector/Class_/ParentClassToTraitsRector.php index 8d6143141ec..553eba7eae3 100644 --- a/rules/Transform/Rector/Class_/ParentClassToTraitsRector.php +++ b/rules/Transform/Rector/Class_/ParentClassToTraitsRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->extends === null) { return null; @@ -94,7 +94,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $parentClassToTraits = $configuration[self::PARENT_CLASS_TO_TRAITS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($parentClassToTraits, \Rector\Transform\ValueObject\ParentClassToTraits::class); diff --git a/rules/Transform/Rector/Class_/RemoveAllowDynamicPropertiesAttributeRector.php b/rules/Transform/Rector/Class_/RemoveAllowDynamicPropertiesAttributeRector.php index 6817660907a..c1ec9c4fe9c 100644 --- a/rules/Transform/Rector/Class_/RemoveAllowDynamicPropertiesAttributeRector.php +++ b/rules/Transform/Rector/Class_/RemoveAllowDynamicPropertiesAttributeRector.php @@ -61,16 +61,19 @@ CODE_SAMPLE { return [\PhpParser\Node\Stmt\Class_::class]; } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { $transformOnNamespaces = $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString($transformOnNamespaces); $this->transformOnNamespaces = $transformOnNamespaces; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldRemove($node)) { return $this->removeAllowDynamicPropertiesAttribute($node); diff --git a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php index 6e074368424..768a41c2fca 100644 --- a/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php +++ b/rules/Transform/Rector/FuncCall/ArgumentFuncCallToMethodCallRector.php @@ -102,9 +102,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipFuncCall($node)) { return null; @@ -127,7 +127,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $functionToMethodCalls = $configuration[self::FUNCTIONS_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($functionToMethodCalls); diff --git a/rules/Transform/Rector/FuncCall/FuncCallToConstFetchRector.php b/rules/Transform/Rector/FuncCall/FuncCallToConstFetchRector.php index d023b9f0ee5..81a8237e7a5 100644 --- a/rules/Transform/Rector/FuncCall/FuncCallToConstFetchRector.php +++ b/rules/Transform/Rector/FuncCall/FuncCallToConstFetchRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $functionName = $this->getName($node); if (!\is_string($functionName)) { @@ -72,7 +72,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $functionsToConstants = $configuration[self::FUNCTIONS_TO_CONSTANTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($functionsToConstants); diff --git a/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php b/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php index 830f0671b9f..909820bd12b 100644 --- a/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php +++ b/rules/Transform/Rector/FuncCall/FuncCallToMethodCallRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { @@ -104,7 +104,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $funcCallsToClassMethodCalls = $configuration[self::FUNC_CALL_TO_CLASS_METHOD_CALL] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($funcCallsToClassMethodCalls); diff --git a/rules/Transform/Rector/FuncCall/FuncCallToNewRector.php b/rules/Transform/Rector/FuncCall/FuncCallToNewRector.php index 295c0cff33d..e32f8365f2d 100644 --- a/rules/Transform/Rector/FuncCall/FuncCallToNewRector.php +++ b/rules/Transform/Rector/FuncCall/FuncCallToNewRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->functionToNew as $function => $new) { if (!$this->isName($node, $function)) { @@ -71,7 +71,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $functionsToNews = $configuration[self::FUNCTIONS_TO_NEWS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($functionsToNews); diff --git a/rules/Transform/Rector/FuncCall/FuncCallToStaticCallRector.php b/rules/Transform/Rector/FuncCall/FuncCallToStaticCallRector.php index 24bc689dca1..748579c9b84 100644 --- a/rules/Transform/Rector/FuncCall/FuncCallToStaticCallRector.php +++ b/rules/Transform/Rector/FuncCall/FuncCallToStaticCallRector.php @@ -37,9 +37,9 @@ final class FuncCallToStaticCallRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->funcCallsToStaticCalls as $funcCallToStaticCall) { if (!$this->isName($node, $funcCallToStaticCall->getOldFuncName())) { @@ -52,7 +52,7 @@ final class FuncCallToStaticCallRector extends \Rector\Core\Rector\AbstractRecto /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $funcCallsToStaticCalls = $configuration[self::FUNC_CALLS_TO_STATIC_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($funcCallsToStaticCalls); diff --git a/rules/Transform/Rector/Function_/ReservedFnFunctionRector.php b/rules/Transform/Rector/Function_/ReservedFnFunctionRector.php index 2fb667e64c9..152d75846ee 100644 --- a/rules/Transform/Rector/Function_/ReservedFnFunctionRector.php +++ b/rules/Transform/Rector/Function_/ReservedFnFunctionRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\FuncCall::class]; } /** - * @param Function_|FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->reservedNamesToNewOnes as $reservedName => $newName) { if (!$this->isName($node->name, $reservedName)) { @@ -91,7 +91,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $reservedNamesToNewOnes = $configuration[self::RESERVED_NAMES_TO_NEW_ONES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($reservedNamesToNewOnes)); diff --git a/rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php b/rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php index 0c4046f0f82..514755f9fdd 100644 --- a/rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php +++ b/rules/Transform/Rector/Isset_/UnsetAndIssetToMethodCallRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Isset_::class, \PhpParser\Node\Stmt\Unset_::class]; } /** - * @param Isset_|Unset_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->vars as $arrayDimFetch) { if (!$arrayDimFetch instanceof \PhpParser\Node\Expr\ArrayDimFetch) { @@ -72,7 +72,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $issetUnsetToMethodCalls = $configuration[self::ISSET_UNSET_TO_METHOD_CALL] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($issetUnsetToMethodCalls); diff --git a/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php b/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php index 950667747b3..e73792d95a6 100644 --- a/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php +++ b/rules/Transform/Rector/MethodCall/CallableInMethodCallToVariableRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Expr\MethodCall + public function refactor($node) : ?\PhpParser\Node\Expr\MethodCall { foreach ($this->callableInMethodCallToVariable as $singleCallableInMethodCallToVariable) { if (!$this->isObjectType($node->var, $singleCallableInMethodCallToVariable->getObjectType())) { @@ -106,7 +106,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $callableInMethodCallToVariable = $configuration[self::CALLABLE_IN_METHOD_CALL_TO_VARIABLE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($callableInMethodCallToVariable); diff --git a/rules/Transform/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php b/rules/Transform/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php index f062a248e42..0a430548487 100644 --- a/rules/Transform/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php +++ b/rules/Transform/Rector/MethodCall/MethodCallToAnotherMethodCallWithArgumentsRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodCallRenamesWithAddedArguments as $methodCallRenameWithAddedArgument) { if (!$this->isObjectType($node->var, $methodCallRenameWithAddedArgument->getObjectType())) { @@ -66,7 +66,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallRenamesWithAddedArguments = $configuration[self::METHOD_CALL_RENAMES_WITH_ADDED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($methodCallRenamesWithAddedArguments); diff --git a/rules/Transform/Rector/MethodCall/MethodCallToMethodCallRector.php b/rules/Transform/Rector/MethodCall/MethodCallToMethodCallRector.php index b6850129c20..0827ebe1cea 100644 --- a/rules/Transform/Rector/MethodCall/MethodCallToMethodCallRector.php +++ b/rules/Transform/Rector/MethodCall/MethodCallToMethodCallRector.php @@ -94,9 +94,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodCallsToMethodsCalls as $methodCallToMethodCall) { if (!$node->var instanceof \PhpParser\Node\Expr\PropertyFetch) { @@ -128,7 +128,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallsToMethodsCalls = $configuration[self::METHOD_CALLS_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($methodCallsToMethodsCalls, \Rector\Transform\ValueObject\MethodCallToMethodCall::class); diff --git a/rules/Transform/Rector/MethodCall/MethodCallToPropertyFetchRector.php b/rules/Transform/Rector/MethodCall/MethodCallToPropertyFetchRector.php index 7efeaa7f7a3..17026614768 100644 --- a/rules/Transform/Rector/MethodCall/MethodCallToPropertyFetchRector.php +++ b/rules/Transform/Rector/MethodCall/MethodCallToPropertyFetchRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodCallToPropertyFetchCollection as $methodName => $propertyName) { if (!$this->isName($node->name, $methodName)) { @@ -70,7 +70,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallToPropertyFetchCollection = $configuration[self::METHOD_CALL_TO_PROPERTY_FETCHES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($methodCallToPropertyFetchCollection)); diff --git a/rules/Transform/Rector/MethodCall/MethodCallToStaticCallRector.php b/rules/Transform/Rector/MethodCall/MethodCallToStaticCallRector.php index 80428eb127d..f3354c25b3e 100644 --- a/rules/Transform/Rector/MethodCall/MethodCallToStaticCallRector.php +++ b/rules/Transform/Rector/MethodCall/MethodCallToStaticCallRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodCallsToStaticCalls as $methodCallToStaticCall) { if (!$this->isObjectType($node->var, $methodCallToStaticCall->getOldObjectType())) { @@ -87,7 +87,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallsToStaticCalls = $configuration[self::METHOD_CALLS_TO_STATIC_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($methodCallsToStaticCalls); diff --git a/rules/Transform/Rector/MethodCall/ReplaceParentCallByPropertyCallRector.php b/rules/Transform/Rector/MethodCall/ReplaceParentCallByPropertyCallRector.php index 7c0c4859319..598b6649b89 100644 --- a/rules/Transform/Rector/MethodCall/ReplaceParentCallByPropertyCallRector.php +++ b/rules/Transform/Rector/MethodCall/ReplaceParentCallByPropertyCallRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->parentCallToProperties as $parentCallToProperty) { if (!$this->isObjectType($node->var, $parentCallToProperty->getObjectType())) { @@ -74,7 +74,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $parentCallToProperties = $configuration[self::PARENT_CALLS_TO_PROPERTIES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($parentCallToProperties, \Rector\Transform\ValueObject\ReplaceParentCallByPropertyCall::class); diff --git a/rules/Transform/Rector/MethodCall/ServiceGetterToConstructorInjectionRector.php b/rules/Transform/Rector/MethodCall/ServiceGetterToConstructorInjectionRector.php index 9ae48da8a19..b0463cb30f9 100644 --- a/rules/Transform/Rector/MethodCall/ServiceGetterToConstructorInjectionRector.php +++ b/rules/Transform/Rector/MethodCall/ServiceGetterToConstructorInjectionRector.php @@ -131,9 +131,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { @@ -160,7 +160,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodCallToServices = $configuration[self::METHOD_CALL_TO_SERVICES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($methodCallToServices); diff --git a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php index 88ebc349226..b41111d7744 100644 --- a/rules/Transform/Rector/New_/NewArgToMethodCallRector.php +++ b/rules/Transform/Rector/New_/NewArgToMethodCallRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->newArgsToMethodCalls as $newArgToMethodCall) { if (!$this->isObjectType($node->class, $newArgToMethodCall->getObjectType())) { @@ -86,7 +86,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $newArgsToMethodCalls = $configuration[self::NEW_ARGS_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($newArgsToMethodCalls); diff --git a/rules/Transform/Rector/New_/NewToConstructorInjectionRector.php b/rules/Transform/Rector/New_/NewToConstructorInjectionRector.php index c180382dfbb..418a1079550 100644 --- a/rules/Transform/Rector/New_/NewToConstructorInjectionRector.php +++ b/rules/Transform/Rector/New_/NewToConstructorInjectionRector.php @@ -103,9 +103,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class, \PhpParser\Node\Expr\Assign::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param New_|Assign|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\MethodCall) { return $this->refactorMethodCall($node); @@ -121,7 +121,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $typesToConstructorInjections = $configuration[self::TYPES_TO_CONSTRUCTOR_INJECTION] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($typesToConstructorInjections); diff --git a/rules/Transform/Rector/New_/NewToMethodCallRector.php b/rules/Transform/Rector/New_/NewToMethodCallRector.php index 05a73101a40..f3eeefab691 100644 --- a/rules/Transform/Rector/New_/NewToMethodCallRector.php +++ b/rules/Transform/Rector/New_/NewToMethodCallRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $class = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$class instanceof \PhpParser\Node\Stmt\Class_) { @@ -117,7 +117,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $newsToMethodCalls = $configuration[self::NEWS_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($newsToMethodCalls); diff --git a/rules/Transform/Rector/New_/NewToStaticCallRector.php b/rules/Transform/Rector/New_/NewToStaticCallRector.php index 8f2068ec155..e1ce85a2237 100644 --- a/rules/Transform/Rector/New_/NewToStaticCallRector.php +++ b/rules/Transform/Rector/New_/NewToStaticCallRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->typeToStaticCalls as $typeToStaticCall) { if (!$this->isObjectType($node->class, $typeToStaticCall->getObjectType())) { @@ -70,7 +70,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $typeToStaticCalls = $configuration[self::TYPE_TO_STATIC_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($typeToStaticCalls); diff --git a/rules/Transform/Rector/StaticCall/StaticCallToFuncCallRector.php b/rules/Transform/Rector/StaticCall/StaticCallToFuncCallRector.php index 289ea31770e..208a711c7a2 100644 --- a/rules/Transform/Rector/StaticCall/StaticCallToFuncCallRector.php +++ b/rules/Transform/Rector/StaticCall/StaticCallToFuncCallRector.php @@ -46,9 +46,9 @@ final class StaticCallToFuncCallRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->staticCallsToFunctions as $staticCallToFunction) { if (!$this->isObjectType($node->class, $staticCallToFunction->getObjectType())) { @@ -64,7 +64,7 @@ final class StaticCallToFuncCallRector extends \Rector\Core\Rector\AbstractRecto /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $staticCallsToFunctions = $configuration[self::STATIC_CALLS_TO_FUNCTIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($staticCallsToFunctions); diff --git a/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php b/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php index 50c5a0d9215..15ae8ca3cbe 100644 --- a/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php +++ b/rules/Transform/Rector/StaticCall/StaticCallToMethodCallRector.php @@ -86,9 +86,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\Class_::class); if (!$classLike instanceof \PhpParser\Node\Stmt\Class_) { @@ -121,7 +121,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $staticCallsToMethodCalls = $configuration[self::STATIC_CALLS_TO_METHOD_CALLS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($staticCallsToMethodCalls); diff --git a/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php b/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php index 1d1cbbe86c1..5bf05d66a06 100644 --- a/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php +++ b/rules/Transform/Rector/StaticCall/StaticCallToNewRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param Node\Expr\StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->staticCallsToNews as $staticCallToNew) { if (!$this->isName($node->class, $staticCallToNew->getClass())) { @@ -81,7 +81,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $staticCallsToNews = $configuration[self::STATIC_CALLS_TO_NEWS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($staticCallsToNews, \Rector\Transform\ValueObject\StaticCallToNew::class); diff --git a/rules/Transform/Rector/String_/StringToClassConstantRector.php b/rules/Transform/Rector/String_/StringToClassConstantRector.php index 1430e99a226..14c3b8f84f9 100644 --- a/rules/Transform/Rector/String_/StringToClassConstantRector.php +++ b/rules/Transform/Rector/String_/StringToClassConstantRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->stringsToClassConstants as $stringToClassConstant) { if (!$this->valueResolver->isValue($node, $stringToClassConstant->getString())) { @@ -70,7 +70,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $stringToClassConstants = $configuration[self::STRINGS_TO_CLASS_CONSTANTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($stringToClassConstants); diff --git a/rules/Transform/Rector/String_/ToStringToMethodCallRector.php b/rules/Transform/Rector/String_/ToStringToMethodCallRector.php index a02fe166b6e..61f17846775 100644 --- a/rules/Transform/Rector/String_/ToStringToMethodCallRector.php +++ b/rules/Transform/Rector/String_/ToStringToMethodCallRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Cast\String_::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param String_|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\Cast\String_) { return $this->processStringNode($node); @@ -62,7 +62,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodNamesByType = $configuration[self::METHOD_NAMES_BY_TYPE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::allString(\array_keys($methodNamesByType)); diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector.php index 40accb6a9f4..26caea47706 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddArrayParamDocTypeRector.php @@ -96,9 +96,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->getParams() === []) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddArrayReturnDocTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddArrayReturnDocTypeRector.php index d8281c92b08..25aeff1329f 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddArrayReturnDocTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddArrayReturnDocTypeRector.php @@ -121,9 +121,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); if ($this->shouldSkip($node, $phpDocInfo)) { diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector.php index a1c0f9ab66f..83bece6a729 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddMethodCallBasedStrictParamTypeRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->params === []) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddParamTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddParamTypeDeclarationRector.php index 72c92b45643..0c1f74bf2e4 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddParamTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddParamTypeDeclarationRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; @@ -94,7 +94,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $parameterTypehints = $configuration[self::PARAMETER_TYPEHINTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($parameterTypehints); diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php index 2e37f3ad5b8..7bb6ff94fe2 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->methodReturnTypes as $methodReturnType) { if (!$this->isObjectType($node, $methodReturnType->getObjectType())) { @@ -88,7 +88,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodReturnTypes = $configuration[self::METHOD_RETURN_TYPES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($methodReturnTypes); diff --git a/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php b/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php index 5df960aa891..0cc0c782cf1 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/AddVoidReturnTypeWhereNoReturnRector.php @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->returnType !== null) { return null; @@ -116,7 +116,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $usePhpdoc = $configuration[self::USE_PHPDOC] ?? \false; \RectorPrefix20211210\Webmozart\Assert\Assert::boolean($usePhpdoc); diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php index 39e8d259ea2..f736d2bbdbf 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByMethodCallTypeRector.php @@ -106,9 +106,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClassMethod($node)) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php index 7b215856c08..06cb85ee05f 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ParamTypeByParentCallTypeRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector.php index d317ad0baaa..77a36cbd608 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class]; } /** - * @param ClassMethod|Function_|Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php index da15b030462..0ee5632d170 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromReturnNewRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param ClassMethod|Function_|ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->returnType !== null) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector.php index 250556d10a7..f269b40a6f4 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedCallRector.php @@ -93,9 +93,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Function_::class, \PhpParser\Node\Expr\Closure::class, \PhpParser\Node\Expr\ArrowFunction::class]; } /** - * @param ClassMethod|Function_|Closure|ArrowFunction $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isSkipped($node)) { return null; diff --git a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php index 797f416bd3b..d5fc7b0404c 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/ReturnTypeFromStrictTypedPropertyRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->returnType !== null) { return null; diff --git a/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php b/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php index 260d5027198..c91bccb213d 100644 --- a/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php +++ b/rules/TypeDeclaration/Rector/Closure/AddClosureReturnTypeRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Closure::class]; } /** - * @param Closure $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->returnType !== null) { return null; diff --git a/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php index 2b997b8ad12..baa31e06ac4 100644 --- a/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/FunctionLike/ParamTypeDeclarationRector.php @@ -135,9 +135,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->hasChanged = \false; if ($node->params === []) { diff --git a/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php index e591a2e28ff..ecb2ef82f9d 100644 --- a/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector.php @@ -112,9 +112,9 @@ CODE_SAMPLE )]); } /** - * @param ClassMethod|Function_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClassLike($node)) { return null; diff --git a/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php b/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php index ca1f3bc9373..0e98b29e7a7 100644 --- a/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php +++ b/rules/TypeDeclaration/Rector/MethodCall/FormerNullableArgumentToScalarTypedRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->args === []) { return null; diff --git a/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php b/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php index 4124f46afed..ca41e91eed4 100644 --- a/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php +++ b/rules/TypeDeclaration/Rector/Param/ParamTypeFromStrictTypedPropertyRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Param::class]; } /** - * @param Param $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $parent = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node\FunctionLike) { @@ -80,7 +80,11 @@ CODE_SAMPLE } return $this->decorateParamWithType($parent, $node); } - public function decorateParamWithType(\PhpParser\Node\FunctionLike $functionLike, \PhpParser\Node\Param $param) : ?\PhpParser\Node\Param + /** + * @param \PhpParser\Node\FunctionLike $functionLike + * @param \PhpParser\Node\Param $param + */ + public function decorateParamWithType($functionLike, $param) : ?\PhpParser\Node\Param { if ($param->type !== null) { return null; diff --git a/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php index 32c1c454ba6..a1c93161127 100644 --- a/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/Property/AddPropertyTypeDeclarationRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // type is already known if ($node->type !== null) { @@ -87,7 +87,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($configuration, \Rector\TypeDeclaration\ValueObject\AddPropertyTypeDeclaration::class); $this->addPropertyTypeDeclarations = $configuration; diff --git a/rules/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector.php b/rules/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector.php index 7158cf0720d..6be2f30a0f9 100644 --- a/rules/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector.php +++ b/rules/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $propertyType = $this->propertyTypeInferer->inferProperty($node); if ($propertyType instanceof \PHPStan\Type\MixedType) { diff --git a/rules/TypeDeclaration/Rector/Property/PropertyTypeDeclarationRector.php b/rules/TypeDeclaration/Rector/Property/PropertyTypeDeclarationRector.php index 8d79ba67c4e..db7d026d5f4 100644 --- a/rules/TypeDeclaration/Rector/Property/PropertyTypeDeclarationRector.php +++ b/rules/TypeDeclaration/Rector/Property/PropertyTypeDeclarationRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (\count($node->props) !== 1) { return null; diff --git a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php index 64bf4dbb191..12cb21e3269 100644 --- a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php +++ b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictConstructorRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->type !== null) { return null; diff --git a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php index df865f67f3a..61a189ce0c7 100644 --- a/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php +++ b/rules/TypeDeclaration/Rector/Property/TypedPropertyFromStrictGetterMethodReturnTypeRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node\Stmt\Property + public function refactor($node) : ?\PhpParser\Node\Stmt\Property { if ($node->type !== null) { return null; diff --git a/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php b/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php index 3de24dbe1a8..a97775437f3 100644 --- a/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php +++ b/rules/TypeDeclaration/TypeInferer/ReturnTypeInferer.php @@ -5,9 +5,12 @@ namespace Rector\TypeDeclaration\TypeInferer; use PhpParser\Node; use PhpParser\Node\Expr; +use PhpParser\Node\Expr\ArrowFunction; +use PhpParser\Node\Expr\Closure; use PhpParser\Node\FunctionLike; use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\ClassMethod; +use PhpParser\Node\Stmt\Function_; use PhpParser\Node\Stmt\Return_; use PhpParser\Node\UnionType as PhpParserUnionType; use PHPStan\Reflection\ClassReflection; @@ -129,8 +132,9 @@ final class ReturnTypeInferer } private function resolveTypeWithVoidHandling(\PhpParser\Node\FunctionLike $functionLike, \PHPStan\Type\Type $resolvedType) : \PHPStan\Type\Type { - if ($resolvedType instanceof \PHPStan\Type\VoidType) { - $hasReturnValue = (bool) $this->betterNodeFinder->findFirst((array) $functionLike->getStmts(), function (\PhpParser\Node $subNode) : bool { + if ($resolvedType instanceof \PHPStan\Type\VoidType && !$functionLike instanceof \PhpParser\Node\Expr\ArrowFunction) { + /** @var ClassMethod|Function_|Closure $functionLike */ + $hasReturnValue = (bool) $this->betterNodeFinder->findFirstInFunctionLikeScoped($functionLike, function (\PhpParser\Node $subNode) : bool { if (!$subNode instanceof \PhpParser\Node\Stmt\Return_) { return \false; } diff --git a/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php b/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php index cae6e8c33a3..b5c9c428cd9 100644 --- a/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php +++ b/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassConst::class]; } /** - * @param ClassConst $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->classConstantVisibilityChanges as $classConstantVisibilityChange) { if (!$this->isObjectType($node, $classConstantVisibilityChange->getObjectType())) { @@ -89,7 +89,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $classConstantVisibilityChanges = $configuration[self::CLASS_CONSTANT_VISIBILITY_CHANGES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($classConstantVisibilityChanges); diff --git a/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php b/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php index 40590a6ad2b..d255905cc67 100644 --- a/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php +++ b/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php @@ -87,9 +87,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { @@ -114,7 +114,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $methodVisibilities = $configuration[self::METHOD_VISIBILITIES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($methodVisibilities); diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 2c657fcb0a6..a4ecfb8f6ff 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = 'dcabd2dad1f6b8e2731cfa873e8d15d8612e4a80'; + public const PACKAGE_VERSION = 'c621d7650d8ab4c9f051aff92ae20701436cd0fc'; /** * @var string */ - public const RELEASE_DATE = '2021-12-10 09:31:49'; + public const RELEASE_DATE = '2021-12-10 10:44:51'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20211210\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/src/Contract/Rector/ConfigurableRectorInterface.php b/src/Contract/Rector/ConfigurableRectorInterface.php index ca55b2a3849..1de8c2980b2 100644 --- a/src/Contract/Rector/ConfigurableRectorInterface.php +++ b/src/Contract/Rector/ConfigurableRectorInterface.php @@ -9,5 +9,5 @@ interface ConfigurableRectorInterface extends \Symplify\RuleDocGenerator\Contrac /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void; + public function configure($configuration) : void; } diff --git a/src/Contract/Rector/NonPhpRectorInterface.php b/src/Contract/Rector/NonPhpRectorInterface.php index f84fda79853..b1d23e95976 100644 --- a/src/Contract/Rector/NonPhpRectorInterface.php +++ b/src/Contract/Rector/NonPhpRectorInterface.php @@ -5,5 +5,8 @@ namespace Rector\Core\Contract\Rector; interface NonPhpRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface { - public function refactorFileContent(string $fileContent) : string; + /** + * @param string $fileContent + */ + public function refactorFileContent($fileContent) : string; } diff --git a/src/Contract/Rector/PhpRectorInterface.php b/src/Contract/Rector/PhpRectorInterface.php index 086bc8f5fa5..4c5f7541583 100644 --- a/src/Contract/Rector/PhpRectorInterface.php +++ b/src/Contract/Rector/PhpRectorInterface.php @@ -17,6 +17,7 @@ interface PhpRectorInterface extends \PhpParser\NodeVisitor, \Rector\Core\Contra /** * Process Node of matched type * @return Node|Node[]|null + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node); + public function refactor($node); } diff --git a/src/DependencyInjection/Collector/ConfigureCallValuesCollector.php b/src/DependencyInjection/Collector/ConfigureCallValuesCollector.php index 72852a3a1d0..1c59516ad29 100644 --- a/src/DependencyInjection/Collector/ConfigureCallValuesCollector.php +++ b/src/DependencyInjection/Collector/ConfigureCallValuesCollector.php @@ -69,6 +69,10 @@ final class ConfigureCallValuesCollector $constantNamesToValues = $classReflection->getConstants(\ReflectionClassConstant::IS_PUBLIC); foreach ($constantNamesToValues as $constantName => $constantValue) { if ($constantValue === $firstKey) { + $reflectionConstant = $classReflection->getReflectionConstant($constantName); + if (\strpos($reflectionConstant->getDocComment(), '@deprecated') === \false) { + continue; + } $warningMessage = \sprintf('The constant for "%s::%s" is deprecated.%sUse "->configure()" directly instead.', $rectorClass, $constantName, \PHP_EOL); $this->symfonyStyle->warning($warningMessage); $configureValue = $configureValue[$firstKey]; diff --git a/src/Kernel/RectorKernel.php b/src/Kernel/RectorKernel.php index 7c3496f29be..abd2383c64c 100644 --- a/src/Kernel/RectorKernel.php +++ b/src/Kernel/RectorKernel.php @@ -40,7 +40,7 @@ final class RectorKernel implements \RectorPrefix20211210\Symplify\SymplifyKerne /** * @param string[] $configFiles */ - public function createFromConfigs(array $configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface + public function createFromConfigs($configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface { $defaultConfigFiles = $this->createDefaultConfigFiles(); $configFiles = \array_merge($defaultConfigFiles, $configFiles); diff --git a/src/NonPhpFile/Rector/RenameClassNonPhpRector.php b/src/NonPhpFile/Rector/RenameClassNonPhpRector.php index 02dc638ed54..018ebd7087b 100644 --- a/src/NonPhpFile/Rector/RenameClassNonPhpRector.php +++ b/src/NonPhpFile/Rector/RenameClassNonPhpRector.php @@ -56,7 +56,10 @@ services: CODE_SAMPLE , ['SomeOldClass' => 'SomeNewClass'])]); } - public function refactorFileContent(string $fileContent) : string + /** + * @param string $fileContent + */ + public function refactorFileContent($fileContent) : string { $classRenames = $this->getRenameClasses(); return $this->renameClasses($fileContent, $classRenames); @@ -64,7 +67,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $renameClasses = $configuration[self::RENAME_CLASSES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($renameClasses); diff --git a/src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php b/src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php index 5ea84cb9011..571c91a9b65 100644 --- a/src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php +++ b/src/PhpParser/NodeVisitor/CreatedByRuleNodeVisitor.php @@ -17,7 +17,10 @@ final class CreatedByRuleNodeVisitor extends \PhpParser\NodeVisitorAbstract { $this->rectorClass = $rectorClass; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { $node->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CREATED_BY_RULE, $this->rectorClass); return $node; diff --git a/src/PhpParser/Printer/BetterStandardPrinter.php b/src/PhpParser/Printer/BetterStandardPrinter.php index 499db998e91..a8a7b80b538 100644 --- a/src/PhpParser/Printer/BetterStandardPrinter.php +++ b/src/PhpParser/Printer/BetterStandardPrinter.php @@ -103,7 +103,7 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard * @param Node[] $origStmts * @param mixed[] $origTokens */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string + public function printFormatPreserving($stmts, $origStmts, $origTokens) : string { $newStmts = $this->resolveNewStmts($stmts); // detect per print @@ -136,26 +136,33 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard /** * @param Node[] $stmts */ - public function prettyPrintFile(array $stmts) : string + public function prettyPrintFile($stmts) : string { // to keep indexes from 0 $stmts = \array_values($stmts); return parent::prettyPrintFile($stmts) . \PHP_EOL; } - public function pFileWithoutNamespace(\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace $fileWithoutNamespace) : string + /** + * @param \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace $fileWithoutNamespace + */ + public function pFileWithoutNamespace($fileWithoutNamespace) : string { $content = $this->pStmts($fileWithoutNamespace->stmts, \false); return \ltrim($content); } - protected function p(\PhpParser\Node $node, $parentFormatPreserved = \false) : string + /** + * @param \PhpParser\Node $node + */ + protected function p($node, $parentFormatPreserved = \false) : string { $content = parent::p($node, $parentFormatPreserved); return $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::WRAPPED_IN_PARENTHESES) === \true ? '(' . $content . ')' : $content; } /** * This allows to use both spaces and tabs vs. original space-only + * @param int $level */ - protected function setIndentLevel(int $level) : void + protected function setIndentLevel($level) : void { $level = \max($level, 0); $this->indentLevel = $level; @@ -190,8 +197,12 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard * @param mixed[] $nodes * @param mixed[] $origNodes * @param int|null $fixup + * @param int $pos + * @param int $indentAdjustment + * @param string $parentNodeType + * @param string $subNodeName */ - protected function pArray(array $nodes, array $origNodes, int &$pos, int $indentAdjustment, string $parentNodeType, string $subNodeName, $fixup) : ?string + protected function pArray($nodes, $origNodes, &$pos, $indentAdjustment, $parentNodeType, $subNodeName, $fixup) : ?string { // reindex positions for printer $nodes = \array_values($nodes); @@ -213,15 +224,17 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard * - or the end of the string * * Prevents `Vendor\Class` => `Vendor\\Class`. + * @param string $string */ - protected function pSingleQuotedString(string $string) : string + protected function pSingleQuotedString($string) : string { return "'" . \RectorPrefix20211210\Nette\Utils\Strings::replace($string, self::QUOTED_SLASH_REGEX, '\\\\$0') . "'"; } /** * Emulates 1_000 in PHP 7.3- version + * @param \PhpParser\Node\Scalar\DNumber $dNumber */ - protected function pScalar_DNumber(\PhpParser\Node\Scalar\DNumber $dNumber) : string + protected function pScalar_DNumber($dNumber) : string { if (\is_string($dNumber->value)) { return $dNumber->value; @@ -233,8 +246,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard * "use(" * ↓ * "use (" + * @param \PhpParser\Node\Expr\Closure $closure */ - protected function pExpr_Closure(\PhpParser\Node\Expr\Closure $closure) : string + protected function pExpr_Closure($closure) : string { $closureContent = parent::pExpr_Closure($closure); return \RectorPrefix20211210\Nette\Utils\Strings::replace($closureContent, self::USE_REGEX, '$1 ('); @@ -242,8 +256,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard /** * Do not add "()" on Expressions * @see https://github.com/rectorphp/rector/pull/401#discussion_r181487199 + * @param \PhpParser\Node\Expr\Yield_ $yield */ - protected function pExpr_Yield(\PhpParser\Node\Expr\Yield_ $yield) : string + protected function pExpr_Yield($yield) : string { if ($yield->value === null) { return 'yield'; @@ -256,8 +271,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard /** * Print arrays in short [] by default, * to prevent manual explicit array shortening. + * @param \PhpParser\Node\Expr\Array_ $array */ - protected function pExpr_Array(\PhpParser\Node\Expr\Array_ $array) : string + protected function pExpr_Array($array) : string { if (!$array->hasAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND)) { $array->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND, \PhpParser\Node\Expr\Array_::KIND_SHORT); @@ -266,8 +282,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } /** * Fixes escaping of regular patterns + * @param \PhpParser\Node\Scalar\String_ $string */ - protected function pScalar_String(\PhpParser\Node\Scalar\String_ $string) : string + protected function pScalar_String($string) : string { $isRegularPattern = (bool) $string->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::IS_REGULAR_PATTERN, \false); if (!$isRegularPattern) { @@ -284,8 +301,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } /** * @param Node[] $nodes + * @param bool $indent */ - protected function pStmts(array $nodes, bool $indent = \true) : string + protected function pStmts($nodes, $indent = \true) : string { $this->moveCommentsFromAttributeObjectToCommentsAttribute($nodes); return parent::pStmts($nodes, $indent); @@ -294,8 +312,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard * "...$params) : ReturnType" * ↓ * "...$params): ReturnType" + * @param \PhpParser\Node\Stmt\ClassMethod $classMethod */ - protected function pStmt_ClassMethod(\PhpParser\Node\Stmt\ClassMethod $classMethod) : string + protected function pStmt_ClassMethod($classMethod) : string { $content = parent::pStmt_ClassMethod($classMethod); // this approach is chosen, to keep changes in parent pStmt_ClassMethod() updated @@ -303,8 +322,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } /** * Clean class and trait from empty "use x;" for traits causing invalid code + * @param \PhpParser\Node\Stmt\Class_ $class */ - protected function pStmt_Class(\PhpParser\Node\Stmt\Class_ $class) : string + protected function pStmt_Class($class) : string { $shouldReindex = \false; foreach ($class->stmts as $key => $stmt) { @@ -321,13 +341,17 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } /** * It remove all spaces extra to parent + * @param \PhpParser\Node\Stmt\Declare_ $declare */ - protected function pStmt_Declare(\PhpParser\Node\Stmt\Declare_ $declare) : string + protected function pStmt_Declare($declare) : string { $declareString = parent::pStmt_Declare($declare); return \RectorPrefix20211210\Nette\Utils\Strings::replace($declareString, '#\\s+#', ''); } - protected function pExpr_Ternary(\PhpParser\Node\Expr\Ternary $ternary) : string + /** + * @param \PhpParser\Node\Expr\Ternary $ternary + */ + protected function pExpr_Ternary($ternary) : string { $kind = $ternary->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if ($kind === 'wrapped_with_brackets') { @@ -338,8 +362,9 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } /** * Remove extra \\ from FQN use imports, for easier use in the code + * @param \PhpParser\Node\Stmt\Use_ $use */ - protected function pStmt_Use(\PhpParser\Node\Stmt\Use_ $use) : string + protected function pStmt_Use($use) : string { if ($use->type !== \PhpParser\Node\Stmt\Use_::TYPE_NORMAL) { return parent::pStmt_Use($use); @@ -352,12 +377,18 @@ final class BetterStandardPrinter extends \PhpParser\PrettyPrinter\Standard } return parent::pStmt_Use($use); } - protected function pScalar_EncapsedStringPart(\PhpParser\Node\Scalar\EncapsedStringPart $encapsedStringPart) : string + /** + * @param \PhpParser\Node\Scalar\EncapsedStringPart $encapsedStringPart + */ + protected function pScalar_EncapsedStringPart($encapsedStringPart) : string { // parent throws exception, but we need to compare string return '`' . $encapsedStringPart->value . '`'; } - protected function pCommaSeparated(array $nodes) : string + /** + * @param mixed[] $nodes + */ + protected function pCommaSeparated($nodes) : string { $result = parent::pCommaSeparated($nodes); $last = \end($nodes); diff --git a/src/Rector/AbstractRector.php b/src/Rector/AbstractRector.php index 161fffe845b..b063a5b47da 100644 --- a/src/Rector/AbstractRector.php +++ b/src/Rector/AbstractRector.php @@ -203,8 +203,9 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements } /** * @return Node[]|null + * @param mixed[] $nodes */ - public function beforeTraverse(array $nodes) : ?array + public function beforeTraverse($nodes) : ?array { $this->previousAppliedClass = null; // workaround for file around refactor() @@ -217,8 +218,9 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements } /** * @return Node|int|null + * @param \PhpParser\Node $node */ - public final function enterNode(\PhpParser\Node $node) + public final function enterNode($node) { $nodeClass = \get_class($node); if (!$this->isMatchingNodeType($nodeClass)) { @@ -274,43 +276,58 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements /** * Replacing nodes in leaveNode() method avoids infinite recursion * see"infinite recursion" in https://github.com/nikic/PHP-Parser/blob/master/doc/component/Walking_the_AST.markdown + * @param \PhpParser\Node $node */ - public function leaveNode(\PhpParser\Node $node) + public function leaveNode($node) { $objectHash = \spl_object_hash($node); // update parents relations!!! return $this->nodesToReturn[$objectHash] ?? $node; } - protected function isName(\PhpParser\Node $node, string $name) : bool + /** + * @param \PhpParser\Node $node + * @param string $name + */ + protected function isName($node, $name) : bool { return $this->nodeNameResolver->isName($node, $name); } /** * @param string[] $names + * @param \PhpParser\Node $node */ - protected function isNames(\PhpParser\Node $node, array $names) : bool + protected function isNames($node, $names) : bool { return $this->nodeNameResolver->isNames($node, $names); } - protected function getName(\PhpParser\Node $node) : ?string + /** + * @param \PhpParser\Node $node + */ + protected function getName($node) : ?string { return $this->nodeNameResolver->getName($node); } - protected function isObjectType(\PhpParser\Node $node, \PHPStan\Type\ObjectType $objectType) : bool + /** + * @param \PhpParser\Node $node + * @param \PHPStan\Type\ObjectType $objectType + */ + protected function isObjectType($node, $objectType) : bool { return $this->nodeTypeResolver->isObjectType($node, $objectType); } /** * Use this method for getting expr|node type + * @param \PhpParser\Node $node */ - protected function getType(\PhpParser\Node $node) : \PHPStan\Type\Type + protected function getType($node) : \PHPStan\Type\Type { return $this->nodeTypeResolver->getType($node); } /** * @param mixed[]|\PhpParser\Node $nodes + * @param callable $callable */ - protected function traverseNodesWithCallable($nodes, callable $callable) : void + protected function traverseNodesWithCallable($nodes, $callable) : void { $this->simpleCallableNodeTraverser->traverseNodesWithCallable($nodes, $callable); } @@ -321,7 +338,11 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements { return $this->betterStandardPrinter->print($node); } - protected function mirrorComments(\PhpParser\Node $newNode, \PhpParser\Node $oldNode) : void + /** + * @param \PhpParser\Node $newNode + * @param \PhpParser\Node $oldNode + */ + protected function mirrorComments($newNode, $oldNode) : void { $newNode->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PHP_DOC_INFO, $oldNode->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PHP_DOC_INFO)); $newNode->setAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::COMMENTS, $oldNode->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::COMMENTS)); @@ -329,8 +350,9 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements /** * @deprecated Return array of stmts directly * @param Stmt[] $stmts + * @param \PhpParser\Node $node */ - protected function unwrapStmts(array $stmts, \PhpParser\Node $node) : void + protected function unwrapStmts($stmts, $node) : void { // move /* */ doc block from if to first element to keep it $currentPhpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); @@ -348,7 +370,7 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements * @param Arg[] $appendingArgs * @return Arg[] */ - protected function appendArgs(array $currentArgs, array $appendingArgs) : array + protected function appendArgs($currentArgs, $appendingArgs) : array { foreach ($appendingArgs as $appendingArg) { $currentArgs[] = new \PhpParser\Node\Arg($appendingArg->value); @@ -357,8 +379,9 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements } /** * @return \PhpParser\Node\Expr|\PhpParser\Node\Stmt + * @param \PhpParser\Node\Stmt $stmt */ - protected function unwrapExpression(\PhpParser\Node\Stmt $stmt) + protected function unwrapExpression($stmt) { if ($stmt instanceof \PhpParser\Node\Stmt\Expression) { return $stmt->expr; @@ -368,48 +391,58 @@ abstract class AbstractRector extends \PhpParser\NodeVisitorAbstract implements /** * @deprecated Use refactor() return of [] or directly $nodesToAddCollector * @param Node[] $newNodes + * @param \PhpParser\Node $positionNode */ - protected function addNodesAfterNode(array $newNodes, \PhpParser\Node $positionNode) : void + protected function addNodesAfterNode($newNodes, $positionNode) : void { $this->nodesToAddCollector->addNodesAfterNode($newNodes, $positionNode); } /** * @param Node[] $newNodes * @deprecated Use refactor() return of [] or directly $nodesToAddCollector + * @param \PhpParser\Node $positionNode */ - protected function addNodesBeforeNode(array $newNodes, \PhpParser\Node $positionNode) : void + protected function addNodesBeforeNode($newNodes, $positionNode) : void { $this->nodesToAddCollector->addNodesBeforeNode($newNodes, $positionNode); } /** * @deprecated Use refactor() return of [] or directly $nodesToAddCollector + * @param \PhpParser\Node $newNode + * @param \PhpParser\Node $positionNode */ - protected function addNodeAfterNode(\PhpParser\Node $newNode, \PhpParser\Node $positionNode) : void + protected function addNodeAfterNode($newNode, $positionNode) : void { $this->nodesToAddCollector->addNodeAfterNode($newNode, $positionNode); } /** * @deprecated Use refactor() return of [] or directly $nodesToAddCollector + * @param \PhpParser\Node $newNode + * @param \PhpParser\Node $positionNode */ - protected function addNodeBeforeNode(\PhpParser\Node $newNode, \PhpParser\Node $positionNode) : void + protected function addNodeBeforeNode($newNode, $positionNode) : void { $this->nodesToAddCollector->addNodeBeforeNode($newNode, $positionNode); } - protected function removeNode(\PhpParser\Node $node) : void + /** + * @param \PhpParser\Node $node + */ + protected function removeNode($node) : void { $this->nodeRemover->removeNode($node); } /** * @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\ClassMethod|\PhpParser\Node\Stmt\Function_ $nodeWithStatements + * @param \PhpParser\Node $toBeRemovedNode */ - protected function removeNodeFromStatements($nodeWithStatements, \PhpParser\Node $toBeRemovedNode) : void + protected function removeNodeFromStatements($nodeWithStatements, $toBeRemovedNode) : void { $this->nodeRemover->removeNodeFromStatements($nodeWithStatements, $toBeRemovedNode); } /** * @param Node[] $nodes */ - protected function removeNodes(array $nodes) : void + protected function removeNodes($nodes) : void { $this->nodeRemover->removeNodes($nodes); } diff --git a/src/StaticReflection/SourceLocator/ParentAttributeSourceLocator.php b/src/StaticReflection/SourceLocator/ParentAttributeSourceLocator.php index f9b18852e9b..1656101e1b3 100644 --- a/src/StaticReflection/SourceLocator/ParentAttributeSourceLocator.php +++ b/src/StaticReflection/SourceLocator/ParentAttributeSourceLocator.php @@ -45,7 +45,11 @@ final class ParentAttributeSourceLocator implements \PHPStan\BetterReflection\So { $this->astResolver = $astResolver; } - public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection + /** + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\Identifier $identifier + */ + public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection { if ($identifier->getName() === 'Symfony\\Component\\DependencyInjection\\Attribute\\Autoconfigure' && $this->reflectionProvider->hasClass($identifier->getName())) { $classReflection = $this->reflectionProvider->getClass($identifier->getName()); @@ -62,8 +66,10 @@ final class ParentAttributeSourceLocator implements \PHPStan\BetterReflection\So } /** * @return Reflection[] + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType */ - public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array + public function locateIdentifiersByType($reflector, $identifierType) : array { return []; } diff --git a/src/StaticReflection/SourceLocator/RenamedClassesSourceLocator.php b/src/StaticReflection/SourceLocator/RenamedClassesSourceLocator.php index 24a161ff900..1c15c092683 100644 --- a/src/StaticReflection/SourceLocator/RenamedClassesSourceLocator.php +++ b/src/StaticReflection/SourceLocator/RenamedClassesSourceLocator.php @@ -27,7 +27,11 @@ final class RenamedClassesSourceLocator implements \PHPStan\BetterReflection\Sou { $this->renamedClassesDataCollector = $renamedClassesDataCollector; } - public function locateIdentifier(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\Identifier $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection + /** + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\Identifier $identifier + */ + public function locateIdentifier($reflector, $identifier) : ?\PHPStan\BetterReflection\Reflection\Reflection { foreach ($this->renamedClassesDataCollector->getOldClasses() as $oldClass) { if ($identifier->getName() !== $oldClass) { @@ -40,8 +44,10 @@ final class RenamedClassesSourceLocator implements \PHPStan\BetterReflection\Sou } /** * @return Reflection[] + * @param \PHPStan\BetterReflection\Reflector\Reflector $reflector + * @param \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType */ - public function locateIdentifiersByType(\PHPStan\BetterReflection\Reflector\Reflector $reflector, \PHPStan\BetterReflection\Identifier\IdentifierType $identifierType) : array + public function locateIdentifiersByType($reflector, $identifierType) : array { return []; } diff --git a/vendor/autoload.php b/vendor/autoload.php index 04e850f9abd..7739f56e176 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075::getLoader(); +return ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index e25fd75a09b..fd3a5176344 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075 +class ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', '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\ComposerStaticInit5b95b9935bf71870ed295f9acb37b075::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit5b95b9935bf71870ed295f9acb37b075::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire5b95b9935bf71870ed295f9acb37b075($fileIdentifier, $file); + composerRequire3bc916bb193a710b4ba05e39509fa198($fileIdentifier, $file); } return $loader; } } -function composerRequire5b95b9935bf71870ed295f9acb37b075($fileIdentifier, $file) +function composerRequire3bc916bb193a710b4ba05e39509fa198($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index f684a4efe4e..32b4363ab9f 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit5b95b9935bf71870ed295f9acb37b075 +class ComposerStaticInit3bc916bb193a710b4ba05e39509fa198 { public static $files = array ( '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', @@ -3795,9 +3795,9 @@ class ComposerStaticInit5b95b9935bf71870ed295f9acb37b075 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit5b95b9935bf71870ed295f9acb37b075::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit5b95b9935bf71870ed295f9acb37b075::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit5b95b9935bf71870ed295f9acb37b075::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit3bc916bb193a710b4ba05e39509fa198::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/AggregatingVisitor.php b/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/AggregatingVisitor.php index 8130830ecf0..d8fe267499d 100644 --- a/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/AggregatingVisitor.php +++ b/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/AggregatingVisitor.php @@ -18,7 +18,7 @@ class AggregatingVisitor implements \RectorPrefix20211210\Helmich\TypoScriptPars * @param Visitor $visitor * @return void */ - public function addVisitor(\RectorPrefix20211210\Helmich\TypoScriptParser\Parser\Traverser\Visitor $visitor) : void + public function addVisitor($visitor) : void { $this->visitors[\spl_object_hash($visitor)] = $visitor; } @@ -26,7 +26,7 @@ class AggregatingVisitor implements \RectorPrefix20211210\Helmich\TypoScriptPars * @param Statement[] $statements * @return void */ - public function enterTree(array $statements) : void + public function enterTree($statements) : void { foreach ($this->visitors as $visitor) { $visitor->enterTree($statements); @@ -36,7 +36,7 @@ class AggregatingVisitor implements \RectorPrefix20211210\Helmich\TypoScriptPars * @param Statement $statement * @return void */ - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + public function enterNode($statement) : void { foreach ($this->visitors as $visitor) { $visitor->enterNode($statement); @@ -46,7 +46,7 @@ class AggregatingVisitor implements \RectorPrefix20211210\Helmich\TypoScriptPars * @param Statement $statement * @return void */ - public function exitNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + public function exitNode($statement) : void { foreach ($this->visitors as $visitor) { $visitor->exitNode($statement); @@ -56,7 +56,7 @@ class AggregatingVisitor implements \RectorPrefix20211210\Helmich\TypoScriptPars * @param Statement[] $statements * @return void */ - public function exitTree(array $statements) : void + public function exitTree($statements) : void { foreach ($this->visitors as $visitor) { $visitor->exitTree($statements); diff --git a/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Visitor.php b/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Visitor.php index a4e6621dd41..e89e6008722 100644 --- a/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Visitor.php +++ b/vendor/helmich/typo3-typoscript-parser/src/Parser/Traverser/Visitor.php @@ -16,20 +16,20 @@ interface Visitor * @param Statement[] $statements * @return void */ - public function enterTree(array $statements) : void; + public function enterTree($statements) : void; /** * @param Statement $statement * @return void */ - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void; + public function enterNode($statement) : void; /** * @param Statement $statement * @return void */ - public function exitNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void; + public function exitNode($statement) : void; /** * @param Statement[] $statements * @return void */ - public function exitTree(array $statements) : void; + public function exitTree($statements) : void; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php index 0da77047d8c..e09dc61a4bb 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor.php @@ -16,7 +16,7 @@ interface NodeVisitor * * @return null|Node[] Array of nodes */ - public function beforeTraverse(array $nodes); + public function beforeTraverse($nodes); /** * Called when entering a node. * @@ -34,7 +34,7 @@ interface NodeVisitor * * @return null|int|Node Replacement node (or special return value) */ - public function enterNode(\PhpParser\Node $node); + public function enterNode($node); /** * Called when leaving a node. * @@ -54,7 +54,7 @@ interface NodeVisitor * * @return null|int|Node|Node[] Replacement node (or special return value) */ - public function leaveNode(\PhpParser\Node $node); + public function leaveNode($node); /** * Called once after traversal. * @@ -66,5 +66,5 @@ interface NodeVisitor * * @return null|Node[] Array of nodes */ - public function afterTraverse(array $nodes); + public function afterTraverse($nodes); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php index 49dec17eca6..dafc695f1cd 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/CloningVisitor.php @@ -12,7 +12,10 @@ use PhpParser\NodeVisitorAbstract; */ class CloningVisitor extends \PhpParser\NodeVisitorAbstract { - public function enterNode(\PhpParser\Node $origNode) + /** + * @param \PhpParser\Node $origNode + */ + public function enterNode($origNode) { $node = clone $origNode; $node->setAttribute('origNode', $origNode); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php index aeb3fb8f996..5d05ffe198b 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FindingVisitor.php @@ -30,12 +30,18 @@ class FindingVisitor extends \PhpParser\NodeVisitorAbstract { return $this->foundNodes; } - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { $this->foundNodes = []; return null; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { $filterCallback = $this->filterCallback; if ($filterCallback($node)) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php index 30e53f3b159..a5c050f6b8f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/FirstFindingVisitor.php @@ -31,12 +31,18 @@ class FirstFindingVisitor extends \PhpParser\NodeVisitorAbstract { return $this->foundNode; } - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { $this->foundNode = null; return null; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { $filterCallback = $this->filterCallback; if ($filterCallback($node)) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 20c437191a3..f4da756af82 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -47,12 +47,18 @@ class NameResolver extends \PhpParser\NodeVisitorAbstract { return $this->nameContext; } - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { $this->nameContext->startNamespace(); return null; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { if ($node instanceof \PhpParser\Node\Stmt\Namespace_) { $this->nameContext->startNamespace($node->name); @@ -189,7 +195,7 @@ class NameResolver extends \PhpParser\NodeVisitorAbstract * * @return Name Resolved name, or original name with attribute */ - protected function resolveName(\PhpParser\Node\Name $name, int $type) : \PhpParser\Node\Name + protected function resolveName($name, $type) : \PhpParser\Node\Name { if (!$this->replaceNodes) { $resolvedName = $this->nameContext->getResolvedName($name, $type); @@ -215,15 +221,24 @@ class NameResolver extends \PhpParser\NodeVisitorAbstract $name->setAttribute('namespacedName', \PhpParser\Node\Name\FullyQualified::concat($this->nameContext->getNamespace(), $name, $name->getAttributes())); return $name; } - protected function resolveClassName(\PhpParser\Node\Name $name) + /** + * @param \PhpParser\Node\Name $name + */ + protected function resolveClassName($name) { return $this->resolveName($name, \PhpParser\Node\Stmt\Use_::TYPE_NORMAL); } - protected function addNamespacedName(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function addNamespacedName($node) { $node->namespacedName = \PhpParser\Node\Name::concat($this->nameContext->getNamespace(), (string) $node->name); } - protected function resolveAttrGroups(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function resolveAttrGroups($node) { foreach ($node->attrGroups as $attrGroup) { foreach ($attrGroup->attrs as $attr) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php index 3086403aecd..a5d4393acfe 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php @@ -24,12 +24,18 @@ final class NodeConnectingVisitor extends \PhpParser\NodeVisitorAbstract * @var ?Node */ private $previous; - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { $this->stack = []; $this->previous = null; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[\count($this->stack) - 1]); @@ -40,7 +46,10 @@ final class NodeConnectingVisitor extends \PhpParser\NodeVisitorAbstract } $this->stack[] = $node; } - public function leaveNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function leaveNode($node) { $this->previous = $node; \array_pop($this->stack); diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php index 848f2478eec..fcd97af2c46 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php @@ -19,18 +19,27 @@ final class ParentConnectingVisitor extends \PhpParser\NodeVisitorAbstract * @var Node[] */ private $stack = []; - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { $this->stack = []; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { if (!empty($this->stack)) { $node->setAttribute('parent', $this->stack[\count($this->stack) - 1]); } $this->stack[] = $node; } - public function leaveNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function leaveNode($node) { \array_pop($this->stack); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php index 7c2e66c64f5..8031cf548a6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitorAbstract.php @@ -8,19 +8,31 @@ namespace PhpParser; */ class NodeVisitorAbstract implements \PhpParser\NodeVisitor { - public function beforeTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function beforeTraverse($nodes) { return null; } - public function enterNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) { return null; } - public function leaveNode(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + public function leaveNode($node) { return null; } - public function afterTraverse(array $nodes) + /** + * @param mixed[] $nodes + */ + public function afterTraverse($nodes) { return null; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser.php b/vendor/nikic/php-parser/lib/PhpParser/Parser.php index 3aa25c61d9b..fe3e65d1384 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser.php @@ -15,5 +15,5 @@ interface Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null); + public function parse($code, $errorHandler = null); } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php index cec9a97133a..f38a71b0142 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php @@ -23,7 +23,11 @@ class Multiple implements \PhpParser\Parser { $this->parsers = $parsers; } - public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null) + /** + * @param string $code + * @param \PhpParser\ErrorHandler|null $errorHandler + */ + public function parse($code, $errorHandler = null) { if (null === $errorHandler) { $errorHandler = new \PhpParser\ErrorHandler\Throwing(); diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index ee67c162c00..592af695f49 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -136,7 +136,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and * the parser was unable to recover from an error). */ - public function parse(string $code, \PhpParser\ErrorHandler $errorHandler = null) + public function parse($code, $errorHandler = null) { $this->errorHandler = $errorHandler ?: new \PhpParser\ErrorHandler\Throwing(); $this->lexer->startLexing($code, $this->errorHandler); @@ -309,7 +309,10 @@ abstract class ParserAbstract implements \PhpParser\Parser } throw new \RuntimeException('Reached end of parser loop'); } - protected function emitError(\PhpParser\Error $error) + /** + * @param \PhpParser\Error $error + */ + protected function emitError($error) { $this->errorHandler->handleError($error); } @@ -321,7 +324,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * * @return string Formatted error message */ - protected function getErrorMessage(int $symbol, int $state) : string + protected function getErrorMessage($symbol, $state) : string { $expectedString = ''; if ($expected = $this->getExpectedTokens($state)) { @@ -336,7 +339,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * * @return string[] Expected tokens. If too many, an empty array is returned. */ - protected function getExpectedTokens(int $state) : array + protected function getExpectedTokens($state) : array { $expected = []; $base = $this->actionBase[$state]; @@ -396,7 +399,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * @param Node\Stmt[] $stmts * @return Node\Stmt[] */ - protected function handleNamespaces(array $stmts) : array + protected function handleNamespaces($stmts) : array { $hasErrored = \false; $style = $this->getNamespacingStyle($stmts); @@ -519,7 +522,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * * @return Expr\StaticCall */ - protected function fixupPhp5StaticPropCall($prop, array $args, array $attributes) : \PhpParser\Node\Expr\StaticCall + protected function fixupPhp5StaticPropCall($prop, $args, $attributes) : \PhpParser\Node\Expr\StaticCall { if ($prop instanceof \PhpParser\Node\Expr\StaticPropertyFetch) { $name = $prop->name instanceof \PhpParser\Node\VarLikeIdentifier ? $prop->name->toString() : $prop->name; @@ -546,7 +549,11 @@ abstract class ParserAbstract implements \PhpParser\Parser throw new \Exception(); } } - protected function fixupStartAttributes(\PhpParser\Node $to, \PhpParser\Node $from) + /** + * @param \PhpParser\Node $to + * @param \PhpParser\Node $from + */ + protected function fixupStartAttributes($to, $from) { $startAttributes = ['startLine', 'startFilePos', 'startTokenPos']; foreach ($startAttributes as $startAttribute) { @@ -555,7 +562,10 @@ abstract class ParserAbstract implements \PhpParser\Parser } } } - protected function handleBuiltinTypes(\PhpParser\Node\Name $name) + /** + * @param \PhpParser\Node\Name $name + */ + protected function handleBuiltinTypes($name) { $builtinTypes = ['bool' => \true, 'int' => \true, 'float' => \true, 'string' => \true, 'iterable' => \true, 'void' => \true, 'object' => \true, 'null' => \true, 'false' => \true, 'mixed' => \true, 'never' => \true]; if (!$name->isUnqualified()) { @@ -574,11 +584,14 @@ abstract class ParserAbstract implements \PhpParser\Parser * * @return array Combined start and end attributes */ - protected function getAttributesAt(int $pos) : array + protected function getAttributesAt($pos) : array { return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; } - protected function getFloatCastKind(string $cast) : int + /** + * @param string $cast + */ + protected function getFloatCastKind($cast) : int { $cast = \strtolower($cast); if (\strpos($cast, 'float') !== \false) { @@ -607,7 +620,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * * @return LNumber|String_ Integer or string node. */ - protected function parseNumString(string $str, array $attributes) + protected function parseNumString($str, $attributes) { if (!\preg_match('/^(?:0|-?[1-9][0-9]*)$/', $str)) { return new \PhpParser\Node\Scalar\String_($str, $attributes); @@ -618,7 +631,15 @@ abstract class ParserAbstract implements \PhpParser\Parser } return new \PhpParser\Node\Scalar\LNumber($num, $attributes); } - protected function stripIndentation(string $string, int $indentLen, string $indentChar, bool $newlineAtStart, bool $newlineAtEnd, array $attributes) + /** + * @param string $string + * @param int $indentLen + * @param string $indentChar + * @param bool $newlineAtStart + * @param bool $newlineAtEnd + * @param mixed[] $attributes + */ + protected function stripIndentation($string, $indentLen, $indentChar, $newlineAtStart, $newlineAtEnd, $attributes) { if ($indentLen === 0) { return $string; @@ -636,7 +657,14 @@ abstract class ParserAbstract implements \PhpParser\Parser return \substr($matches[0], \strlen($prefix)); }, $string); } - protected function parseDocString(string $startToken, $contents, string $endToken, array $attributes, array $endTokenAttributes, bool $parseUnicodeEscape) + /** + * @param string $startToken + * @param string $endToken + * @param mixed[] $attributes + * @param mixed[] $endTokenAttributes + * @param bool $parseUnicodeEscape + */ + protected function parseDocString($startToken, $contents, $endToken, $attributes, $endTokenAttributes, $parseUnicodeEscape) { $kind = \strpos($startToken, "'") === \false ? \PhpParser\Node\Scalar\String_::KIND_HEREDOC : \PhpParser\Node\Scalar\String_::KIND_NOWDOC; $regex = '/\\A[bB]?<<<[ \\t]*[\'"]?([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)[\'"]?(?:\\r\\n|\\n|\\r)\\z/'; @@ -698,7 +726,7 @@ abstract class ParserAbstract implements \PhpParser\Parser * @param Comment[] $comments * @return array */ - protected function createCommentNopAttributes(array $comments) + protected function createCommentNopAttributes($comments) { $comment = $comments[\count($comments) - 1]; $commentEndLine = $comment->getEndLine(); @@ -729,19 +757,28 @@ abstract class ParserAbstract implements \PhpParser\Parser $this->emitError($error); } } - protected function checkParam(\PhpParser\Node\Param $node) + /** + * @param \PhpParser\Node\Param $node + */ + protected function checkParam($node) { if ($node->variadic && null !== $node->default) { $this->emitError(new \PhpParser\Error('Variadic parameter cannot have a default value', $node->default->getAttributes())); } } - protected function checkTryCatch(\PhpParser\Node\Stmt\TryCatch $node) + /** + * @param \PhpParser\Node\Stmt\TryCatch $node + */ + protected function checkTryCatch($node) { if (empty($node->catches) && null === $node->finally) { $this->emitError(new \PhpParser\Error('Cannot use try without catch or finally', $node->getAttributes())); } } - protected function checkNamespace(\PhpParser\Node\Stmt\Namespace_ $node) + /** + * @param \PhpParser\Node\Stmt\Namespace_ $node + */ + protected function checkNamespace($node) { if (null !== $node->stmts) { foreach ($node->stmts as $stmt) { @@ -765,7 +802,10 @@ abstract class ParserAbstract implements \PhpParser\Parser } } } - protected function checkClass(\PhpParser\Node\Stmt\Class_ $node, $namePos) + /** + * @param \PhpParser\Node\Stmt\Class_ $node + */ + protected function checkClass($node, $namePos) { $this->checkClassName($node->name, $namePos); if ($node->extends && $node->extends->isSpecialClassName()) { @@ -773,17 +813,26 @@ abstract class ParserAbstract implements \PhpParser\Parser } $this->checkImplementedInterfaces($node->implements); } - protected function checkInterface(\PhpParser\Node\Stmt\Interface_ $node, $namePos) + /** + * @param \PhpParser\Node\Stmt\Interface_ $node + */ + protected function checkInterface($node, $namePos) { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->extends); } - protected function checkEnum(\PhpParser\Node\Stmt\Enum_ $node, $namePos) + /** + * @param \PhpParser\Node\Stmt\Enum_ $node + */ + protected function checkEnum($node, $namePos) { $this->checkClassName($node->name, $namePos); $this->checkImplementedInterfaces($node->implements); } - protected function checkClassMethod(\PhpParser\Node\Stmt\ClassMethod $node, $modifierPos) + /** + * @param \PhpParser\Node\Stmt\ClassMethod $node + */ + protected function checkClassMethod($node, $modifierPos) { if ($node->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC) { switch ($node->name->toLowerString()) { @@ -802,7 +851,10 @@ abstract class ParserAbstract implements \PhpParser\Parser $this->emitError(new \PhpParser\Error(\sprintf('Method %s() cannot be readonly', $node->name), $this->getAttributesAt($modifierPos))); } } - protected function checkClassConst(\PhpParser\Node\Stmt\ClassConst $node, $modifierPos) + /** + * @param \PhpParser\Node\Stmt\ClassConst $node + */ + protected function checkClassConst($node, $modifierPos) { if ($node->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC) { $this->emitError(new \PhpParser\Error("Cannot use 'static' as constant modifier", $this->getAttributesAt($modifierPos))); @@ -814,7 +866,10 @@ abstract class ParserAbstract implements \PhpParser\Parser $this->emitError(new \PhpParser\Error("Cannot use 'readonly' as constant modifier", $this->getAttributesAt($modifierPos))); } } - protected function checkProperty(\PhpParser\Node\Stmt\Property $node, $modifierPos) + /** + * @param \PhpParser\Node\Stmt\Property $node + */ + protected function checkProperty($node, $modifierPos) { if ($node->flags & \PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT) { $this->emitError(new \PhpParser\Error('Properties cannot be declared abstract', $this->getAttributesAt($modifierPos))); @@ -823,7 +878,10 @@ abstract class ParserAbstract implements \PhpParser\Parser $this->emitError(new \PhpParser\Error('Properties cannot be declared final', $this->getAttributesAt($modifierPos))); } } - protected function checkUseUse(\PhpParser\Node\Stmt\UseUse $node, $namePos) + /** + * @param \PhpParser\Node\Stmt\UseUse $node + */ + protected function checkUseUse($node, $namePos) { if ($node->alias && $node->alias->isSpecialClassName()) { $this->emitError(new \PhpParser\Error(\sprintf('Cannot use %s as %s because \'%2$s\' is a special class name', $node->name, $node->alias), $this->getAttributesAt($namePos))); diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index e731cf01af7..4aff2333d54 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -16,98 +16,167 @@ use PhpParser\PrettyPrinterAbstract; class Standard extends \PhpParser\PrettyPrinterAbstract { // Special nodes - protected function pParam(\PhpParser\Node\Param $node) + /** + * @param \PhpParser\Node\Param $node + */ + protected function pParam($node) { return $this->pAttrGroups($node->attrGroups, \true) . $this->pModifiers($node->flags) . ($node->type ? $this->p($node->type) . ' ' : '') . ($node->byRef ? '&' : '') . ($node->variadic ? '...' : '') . $this->p($node->var) . ($node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pArg(\PhpParser\Node\Arg $node) + /** + * @param \PhpParser\Node\Arg $node + */ + protected function pArg($node) { return ($node->name ? $node->name->toString() . ': ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pVariadicPlaceholder(\PhpParser\Node\VariadicPlaceholder $node) + /** + * @param \PhpParser\Node\VariadicPlaceholder $node + */ + protected function pVariadicPlaceholder($node) { return '...'; } - protected function pConst(\PhpParser\Node\Const_ $node) + /** + * @param \PhpParser\Node\Const_ $node + */ + protected function pConst($node) { return $node->name . ' = ' . $this->p($node->value); } - protected function pNullableType(\PhpParser\Node\NullableType $node) + /** + * @param \PhpParser\Node\NullableType $node + */ + protected function pNullableType($node) { return '?' . $this->p($node->type); } - protected function pUnionType(\PhpParser\Node\UnionType $node) + /** + * @param \PhpParser\Node\UnionType $node + */ + protected function pUnionType($node) { return $this->pImplode($node->types, '|'); } - protected function pIntersectionType(\PhpParser\Node\IntersectionType $node) + /** + * @param \PhpParser\Node\IntersectionType $node + */ + protected function pIntersectionType($node) { return $this->pImplode($node->types, '&'); } - protected function pIdentifier(\PhpParser\Node\Identifier $node) + /** + * @param \PhpParser\Node\Identifier $node + */ + protected function pIdentifier($node) { return $node->name; } - protected function pVarLikeIdentifier(\PhpParser\Node\VarLikeIdentifier $node) + /** + * @param \PhpParser\Node\VarLikeIdentifier $node + */ + protected function pVarLikeIdentifier($node) { return '$' . $node->name; } - protected function pAttribute(\PhpParser\Node\Attribute $node) + /** + * @param \PhpParser\Node\Attribute $node + */ + protected function pAttribute($node) { return $this->p($node->name) . ($node->args ? '(' . $this->pCommaSeparated($node->args) . ')' : ''); } - protected function pAttributeGroup(\PhpParser\Node\AttributeGroup $node) + /** + * @param \PhpParser\Node\AttributeGroup $node + */ + protected function pAttributeGroup($node) { return '#[' . $this->pCommaSeparated($node->attrs) . ']'; } // Names - protected function pName(\PhpParser\Node\Name $node) + /** + * @param \PhpParser\Node\Name $node + */ + protected function pName($node) { return \implode('\\', $node->parts); } - protected function pName_FullyQualified(\PhpParser\Node\Name\FullyQualified $node) + /** + * @param \PhpParser\Node\Name\FullyQualified $node + */ + protected function pName_FullyQualified($node) { return '\\' . \implode('\\', $node->parts); } - protected function pName_Relative(\PhpParser\Node\Name\Relative $node) + /** + * @param \PhpParser\Node\Name\Relative $node + */ + protected function pName_Relative($node) { return 'namespace\\' . \implode('\\', $node->parts); } // Magic Constants - protected function pScalar_MagicConst_Class(\PhpParser\Node\Scalar\MagicConst\Class_ $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Class_ $node + */ + protected function pScalar_MagicConst_Class($node) { return '__CLASS__'; } - protected function pScalar_MagicConst_Dir(\PhpParser\Node\Scalar\MagicConst\Dir $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Dir $node + */ + protected function pScalar_MagicConst_Dir($node) { return '__DIR__'; } - protected function pScalar_MagicConst_File(\PhpParser\Node\Scalar\MagicConst\File $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\File $node + */ + protected function pScalar_MagicConst_File($node) { return '__FILE__'; } - protected function pScalar_MagicConst_Function(\PhpParser\Node\Scalar\MagicConst\Function_ $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Function_ $node + */ + protected function pScalar_MagicConst_Function($node) { return '__FUNCTION__'; } - protected function pScalar_MagicConst_Line(\PhpParser\Node\Scalar\MagicConst\Line $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Line $node + */ + protected function pScalar_MagicConst_Line($node) { return '__LINE__'; } - protected function pScalar_MagicConst_Method(\PhpParser\Node\Scalar\MagicConst\Method $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Method $node + */ + protected function pScalar_MagicConst_Method($node) { return '__METHOD__'; } - protected function pScalar_MagicConst_Namespace(\PhpParser\Node\Scalar\MagicConst\Namespace_ $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Namespace_ $node + */ + protected function pScalar_MagicConst_Namespace($node) { return '__NAMESPACE__'; } - protected function pScalar_MagicConst_Trait(\PhpParser\Node\Scalar\MagicConst\Trait_ $node) + /** + * @param \PhpParser\Node\Scalar\MagicConst\Trait_ $node + */ + protected function pScalar_MagicConst_Trait($node) { return '__TRAIT__'; } // Scalars - protected function pScalar_String(\PhpParser\Node\Scalar\String_ $node) + /** + * @param \PhpParser\Node\Scalar\String_ $node + */ + protected function pScalar_String($node) { $kind = $node->getAttribute('kind', \PhpParser\Node\Scalar\String_::KIND_SINGLE_QUOTED); switch ($kind) { @@ -137,7 +206,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } throw new \Exception('Invalid string kind'); } - protected function pScalar_Encapsed(\PhpParser\Node\Scalar\Encapsed $node) + /** + * @param \PhpParser\Node\Scalar\Encapsed $node + */ + protected function pScalar_Encapsed($node) { if ($node->getAttribute('kind') === \PhpParser\Node\Scalar\String_::KIND_HEREDOC) { $label = $node->getAttribute('docLabel'); @@ -150,7 +222,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return '"' . $this->pEncapsList($node->parts, '"') . '"'; } - protected function pScalar_LNumber(\PhpParser\Node\Scalar\LNumber $node) + /** + * @param \PhpParser\Node\Scalar\LNumber $node + */ + protected function pScalar_LNumber($node) { if ($node->value === -\PHP_INT_MAX - 1) { // PHP_INT_MIN cannot be represented as a literal, @@ -178,7 +253,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } throw new \Exception('Invalid number kind'); } - protected function pScalar_DNumber(\PhpParser\Node\Scalar\DNumber $node) + /** + * @param \PhpParser\Node\Scalar\DNumber $node + */ + protected function pScalar_DNumber($node) { if (!\is_finite($node->value)) { if ($node->value === \INF) { @@ -201,195 +279,336 @@ class Standard extends \PhpParser\PrettyPrinterAbstract // ensure that number is really printed as float return \preg_match('/^-?[0-9]+$/', $stringValue) ? $stringValue . '.0' : $stringValue; } - protected function pScalar_EncapsedStringPart(\PhpParser\Node\Scalar\EncapsedStringPart $node) + /** + * @param \PhpParser\Node\Scalar\EncapsedStringPart $node + */ + protected function pScalar_EncapsedStringPart($node) { throw new \LogicException('Cannot directly print EncapsedStringPart'); } // Assignments - protected function pExpr_Assign(\PhpParser\Node\Expr\Assign $node) + /** + * @param \PhpParser\Node\Expr\Assign $node + */ + protected function pExpr_Assign($node) { return $this->pInfixOp(\PhpParser\Node\Expr\Assign::class, $node->var, ' = ', $node->expr); } - protected function pExpr_AssignRef(\PhpParser\Node\Expr\AssignRef $node) + /** + * @param \PhpParser\Node\Expr\AssignRef $node + */ + protected function pExpr_AssignRef($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignRef::class, $node->var, ' =& ', $node->expr); } - protected function pExpr_AssignOp_Plus(\PhpParser\Node\Expr\AssignOp\Plus $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Plus $node + */ + protected function pExpr_AssignOp_Plus($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Plus::class, $node->var, ' += ', $node->expr); } - protected function pExpr_AssignOp_Minus(\PhpParser\Node\Expr\AssignOp\Minus $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Minus $node + */ + protected function pExpr_AssignOp_Minus($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Minus::class, $node->var, ' -= ', $node->expr); } - protected function pExpr_AssignOp_Mul(\PhpParser\Node\Expr\AssignOp\Mul $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Mul $node + */ + protected function pExpr_AssignOp_Mul($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Mul::class, $node->var, ' *= ', $node->expr); } - protected function pExpr_AssignOp_Div(\PhpParser\Node\Expr\AssignOp\Div $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Div $node + */ + protected function pExpr_AssignOp_Div($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Div::class, $node->var, ' /= ', $node->expr); } - protected function pExpr_AssignOp_Concat(\PhpParser\Node\Expr\AssignOp\Concat $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Concat $node + */ + protected function pExpr_AssignOp_Concat($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Concat::class, $node->var, ' .= ', $node->expr); } - protected function pExpr_AssignOp_Mod(\PhpParser\Node\Expr\AssignOp\Mod $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Mod $node + */ + protected function pExpr_AssignOp_Mod($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Mod::class, $node->var, ' %= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseAnd(\PhpParser\Node\Expr\AssignOp\BitwiseAnd $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\BitwiseAnd $node + */ + protected function pExpr_AssignOp_BitwiseAnd($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\BitwiseAnd::class, $node->var, ' &= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseOr(\PhpParser\Node\Expr\AssignOp\BitwiseOr $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\BitwiseOr $node + */ + protected function pExpr_AssignOp_BitwiseOr($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\BitwiseOr::class, $node->var, ' |= ', $node->expr); } - protected function pExpr_AssignOp_BitwiseXor(\PhpParser\Node\Expr\AssignOp\BitwiseXor $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\BitwiseXor $node + */ + protected function pExpr_AssignOp_BitwiseXor($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\BitwiseXor::class, $node->var, ' ^= ', $node->expr); } - protected function pExpr_AssignOp_ShiftLeft(\PhpParser\Node\Expr\AssignOp\ShiftLeft $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\ShiftLeft $node + */ + protected function pExpr_AssignOp_ShiftLeft($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\ShiftLeft::class, $node->var, ' <<= ', $node->expr); } - protected function pExpr_AssignOp_ShiftRight(\PhpParser\Node\Expr\AssignOp\ShiftRight $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\ShiftRight $node + */ + protected function pExpr_AssignOp_ShiftRight($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\ShiftRight::class, $node->var, ' >>= ', $node->expr); } - protected function pExpr_AssignOp_Pow(\PhpParser\Node\Expr\AssignOp\Pow $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Pow $node + */ + protected function pExpr_AssignOp_Pow($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Pow::class, $node->var, ' **= ', $node->expr); } - protected function pExpr_AssignOp_Coalesce(\PhpParser\Node\Expr\AssignOp\Coalesce $node) + /** + * @param \PhpParser\Node\Expr\AssignOp\Coalesce $node + */ + protected function pExpr_AssignOp_Coalesce($node) { return $this->pInfixOp(\PhpParser\Node\Expr\AssignOp\Coalesce::class, $node->var, ' ??= ', $node->expr); } // Binary expressions - protected function pExpr_BinaryOp_Plus(\PhpParser\Node\Expr\BinaryOp\Plus $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Plus $node + */ + protected function pExpr_BinaryOp_Plus($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Plus::class, $node->left, ' + ', $node->right); } - protected function pExpr_BinaryOp_Minus(\PhpParser\Node\Expr\BinaryOp\Minus $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Minus $node + */ + protected function pExpr_BinaryOp_Minus($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Minus::class, $node->left, ' - ', $node->right); } - protected function pExpr_BinaryOp_Mul(\PhpParser\Node\Expr\BinaryOp\Mul $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Mul $node + */ + protected function pExpr_BinaryOp_Mul($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Mul::class, $node->left, ' * ', $node->right); } - protected function pExpr_BinaryOp_Div(\PhpParser\Node\Expr\BinaryOp\Div $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Div $node + */ + protected function pExpr_BinaryOp_Div($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Div::class, $node->left, ' / ', $node->right); } - protected function pExpr_BinaryOp_Concat(\PhpParser\Node\Expr\BinaryOp\Concat $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Concat $node + */ + protected function pExpr_BinaryOp_Concat($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Concat::class, $node->left, ' . ', $node->right); } - protected function pExpr_BinaryOp_Mod(\PhpParser\Node\Expr\BinaryOp\Mod $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Mod $node + */ + protected function pExpr_BinaryOp_Mod($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Mod::class, $node->left, ' % ', $node->right); } - protected function pExpr_BinaryOp_BooleanAnd(\PhpParser\Node\Expr\BinaryOp\BooleanAnd $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\BooleanAnd $node + */ + protected function pExpr_BinaryOp_BooleanAnd($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\BooleanAnd::class, $node->left, ' && ', $node->right); } - protected function pExpr_BinaryOp_BooleanOr(\PhpParser\Node\Expr\BinaryOp\BooleanOr $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\BooleanOr $node + */ + protected function pExpr_BinaryOp_BooleanOr($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\BooleanOr::class, $node->left, ' || ', $node->right); } - protected function pExpr_BinaryOp_BitwiseAnd(\PhpParser\Node\Expr\BinaryOp\BitwiseAnd $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\BitwiseAnd $node + */ + protected function pExpr_BinaryOp_BitwiseAnd($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\BitwiseAnd::class, $node->left, ' & ', $node->right); } - protected function pExpr_BinaryOp_BitwiseOr(\PhpParser\Node\Expr\BinaryOp\BitwiseOr $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\BitwiseOr $node + */ + protected function pExpr_BinaryOp_BitwiseOr($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\BitwiseOr::class, $node->left, ' | ', $node->right); } - protected function pExpr_BinaryOp_BitwiseXor(\PhpParser\Node\Expr\BinaryOp\BitwiseXor $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\BitwiseXor $node + */ + protected function pExpr_BinaryOp_BitwiseXor($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\BitwiseXor::class, $node->left, ' ^ ', $node->right); } - protected function pExpr_BinaryOp_ShiftLeft(\PhpParser\Node\Expr\BinaryOp\ShiftLeft $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\ShiftLeft $node + */ + protected function pExpr_BinaryOp_ShiftLeft($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\ShiftLeft::class, $node->left, ' << ', $node->right); } - protected function pExpr_BinaryOp_ShiftRight(\PhpParser\Node\Expr\BinaryOp\ShiftRight $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\ShiftRight $node + */ + protected function pExpr_BinaryOp_ShiftRight($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\ShiftRight::class, $node->left, ' >> ', $node->right); } - protected function pExpr_BinaryOp_Pow(\PhpParser\Node\Expr\BinaryOp\Pow $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Pow $node + */ + protected function pExpr_BinaryOp_Pow($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Pow::class, $node->left, ' ** ', $node->right); } - protected function pExpr_BinaryOp_LogicalAnd(\PhpParser\Node\Expr\BinaryOp\LogicalAnd $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\LogicalAnd $node + */ + protected function pExpr_BinaryOp_LogicalAnd($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\LogicalAnd::class, $node->left, ' and ', $node->right); } - protected function pExpr_BinaryOp_LogicalOr(\PhpParser\Node\Expr\BinaryOp\LogicalOr $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\LogicalOr $node + */ + protected function pExpr_BinaryOp_LogicalOr($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\LogicalOr::class, $node->left, ' or ', $node->right); } - protected function pExpr_BinaryOp_LogicalXor(\PhpParser\Node\Expr\BinaryOp\LogicalXor $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\LogicalXor $node + */ + protected function pExpr_BinaryOp_LogicalXor($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\LogicalXor::class, $node->left, ' xor ', $node->right); } - protected function pExpr_BinaryOp_Equal(\PhpParser\Node\Expr\BinaryOp\Equal $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Equal $node + */ + protected function pExpr_BinaryOp_Equal($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Equal::class, $node->left, ' == ', $node->right); } - protected function pExpr_BinaryOp_NotEqual(\PhpParser\Node\Expr\BinaryOp\NotEqual $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\NotEqual $node + */ + protected function pExpr_BinaryOp_NotEqual($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\NotEqual::class, $node->left, ' != ', $node->right); } - protected function pExpr_BinaryOp_Identical(\PhpParser\Node\Expr\BinaryOp\Identical $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Identical $node + */ + protected function pExpr_BinaryOp_Identical($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Identical::class, $node->left, ' === ', $node->right); } - protected function pExpr_BinaryOp_NotIdentical(\PhpParser\Node\Expr\BinaryOp\NotIdentical $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\NotIdentical $node + */ + protected function pExpr_BinaryOp_NotIdentical($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\NotIdentical::class, $node->left, ' !== ', $node->right); } - protected function pExpr_BinaryOp_Spaceship(\PhpParser\Node\Expr\BinaryOp\Spaceship $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Spaceship $node + */ + protected function pExpr_BinaryOp_Spaceship($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Spaceship::class, $node->left, ' <=> ', $node->right); } - protected function pExpr_BinaryOp_Greater(\PhpParser\Node\Expr\BinaryOp\Greater $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Greater $node + */ + protected function pExpr_BinaryOp_Greater($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Greater::class, $node->left, ' > ', $node->right); } - protected function pExpr_BinaryOp_GreaterOrEqual(\PhpParser\Node\Expr\BinaryOp\GreaterOrEqual $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\GreaterOrEqual $node + */ + protected function pExpr_BinaryOp_GreaterOrEqual($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\GreaterOrEqual::class, $node->left, ' >= ', $node->right); } - protected function pExpr_BinaryOp_Smaller(\PhpParser\Node\Expr\BinaryOp\Smaller $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Smaller $node + */ + protected function pExpr_BinaryOp_Smaller($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Smaller::class, $node->left, ' < ', $node->right); } - protected function pExpr_BinaryOp_SmallerOrEqual(\PhpParser\Node\Expr\BinaryOp\SmallerOrEqual $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\SmallerOrEqual $node + */ + protected function pExpr_BinaryOp_SmallerOrEqual($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\SmallerOrEqual::class, $node->left, ' <= ', $node->right); } - protected function pExpr_BinaryOp_Coalesce(\PhpParser\Node\Expr\BinaryOp\Coalesce $node) + /** + * @param \PhpParser\Node\Expr\BinaryOp\Coalesce $node + */ + protected function pExpr_BinaryOp_Coalesce($node) { return $this->pInfixOp(\PhpParser\Node\Expr\BinaryOp\Coalesce::class, $node->left, ' ?? ', $node->right); } - protected function pExpr_Instanceof(\PhpParser\Node\Expr\Instanceof_ $node) + /** + * @param \PhpParser\Node\Expr\Instanceof_ $node + */ + protected function pExpr_Instanceof($node) { list($precedence, $associativity) = $this->precedenceMap[\PhpParser\Node\Expr\Instanceof_::class]; return $this->pPrec($node->expr, $precedence, $associativity, -1) . ' instanceof ' . $this->pNewVariable($node->class); } // Unary expressions - protected function pExpr_BooleanNot(\PhpParser\Node\Expr\BooleanNot $node) + /** + * @param \PhpParser\Node\Expr\BooleanNot $node + */ + protected function pExpr_BooleanNot($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\BooleanNot::class, '!', $node->expr); } - protected function pExpr_BitwiseNot(\PhpParser\Node\Expr\BitwiseNot $node) + /** + * @param \PhpParser\Node\Expr\BitwiseNot $node + */ + protected function pExpr_BitwiseNot($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\BitwiseNot::class, '~', $node->expr); } - protected function pExpr_UnaryMinus(\PhpParser\Node\Expr\UnaryMinus $node) + /** + * @param \PhpParser\Node\Expr\UnaryMinus $node + */ + protected function pExpr_UnaryMinus($node) { if ($node->expr instanceof \PhpParser\Node\Expr\UnaryMinus || $node->expr instanceof \PhpParser\Node\Expr\PreDec) { // Enforce -(-$expr) instead of --$expr @@ -397,7 +616,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return $this->pPrefixOp(\PhpParser\Node\Expr\UnaryMinus::class, '-', $node->expr); } - protected function pExpr_UnaryPlus(\PhpParser\Node\Expr\UnaryPlus $node) + /** + * @param \PhpParser\Node\Expr\UnaryPlus $node + */ + protected function pExpr_UnaryPlus($node) { if ($node->expr instanceof \PhpParser\Node\Expr\UnaryPlus || $node->expr instanceof \PhpParser\Node\Expr\PreInc) { // Enforce +(+$expr) instead of ++$expr @@ -405,40 +627,67 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return $this->pPrefixOp(\PhpParser\Node\Expr\UnaryPlus::class, '+', $node->expr); } - protected function pExpr_PreInc(\PhpParser\Node\Expr\PreInc $node) + /** + * @param \PhpParser\Node\Expr\PreInc $node + */ + protected function pExpr_PreInc($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\PreInc::class, '++', $node->var); } - protected function pExpr_PreDec(\PhpParser\Node\Expr\PreDec $node) + /** + * @param \PhpParser\Node\Expr\PreDec $node + */ + protected function pExpr_PreDec($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\PreDec::class, '--', $node->var); } - protected function pExpr_PostInc(\PhpParser\Node\Expr\PostInc $node) + /** + * @param \PhpParser\Node\Expr\PostInc $node + */ + protected function pExpr_PostInc($node) { return $this->pPostfixOp(\PhpParser\Node\Expr\PostInc::class, $node->var, '++'); } - protected function pExpr_PostDec(\PhpParser\Node\Expr\PostDec $node) + /** + * @param \PhpParser\Node\Expr\PostDec $node + */ + protected function pExpr_PostDec($node) { return $this->pPostfixOp(\PhpParser\Node\Expr\PostDec::class, $node->var, '--'); } - protected function pExpr_ErrorSuppress(\PhpParser\Node\Expr\ErrorSuppress $node) + /** + * @param \PhpParser\Node\Expr\ErrorSuppress $node + */ + protected function pExpr_ErrorSuppress($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\ErrorSuppress::class, '@', $node->expr); } - protected function pExpr_YieldFrom(\PhpParser\Node\Expr\YieldFrom $node) + /** + * @param \PhpParser\Node\Expr\YieldFrom $node + */ + protected function pExpr_YieldFrom($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\YieldFrom::class, 'yield from ', $node->expr); } - protected function pExpr_Print(\PhpParser\Node\Expr\Print_ $node) + /** + * @param \PhpParser\Node\Expr\Print_ $node + */ + protected function pExpr_Print($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Print_::class, 'print ', $node->expr); } // Casts - protected function pExpr_Cast_Int(\PhpParser\Node\Expr\Cast\Int_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\Int_ $node + */ + protected function pExpr_Cast_Int($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Int_::class, '(int) ', $node->expr); } - protected function pExpr_Cast_Double(\PhpParser\Node\Expr\Cast\Double $node) + /** + * @param \PhpParser\Node\Expr\Cast\Double $node + */ + protected function pExpr_Cast_Double($node) { $kind = $node->getAttribute('kind', \PhpParser\Node\Expr\Cast\Double::KIND_DOUBLE); if ($kind === \PhpParser\Node\Expr\Cast\Double::KIND_DOUBLE) { @@ -450,70 +699,118 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Double::class, $cast . ' ', $node->expr); } - protected function pExpr_Cast_String(\PhpParser\Node\Expr\Cast\String_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\String_ $node + */ + protected function pExpr_Cast_String($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\String_::class, '(string) ', $node->expr); } - protected function pExpr_Cast_Array(\PhpParser\Node\Expr\Cast\Array_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\Array_ $node + */ + protected function pExpr_Cast_Array($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Array_::class, '(array) ', $node->expr); } - protected function pExpr_Cast_Object(\PhpParser\Node\Expr\Cast\Object_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\Object_ $node + */ + protected function pExpr_Cast_Object($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Object_::class, '(object) ', $node->expr); } - protected function pExpr_Cast_Bool(\PhpParser\Node\Expr\Cast\Bool_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\Bool_ $node + */ + protected function pExpr_Cast_Bool($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Bool_::class, '(bool) ', $node->expr); } - protected function pExpr_Cast_Unset(\PhpParser\Node\Expr\Cast\Unset_ $node) + /** + * @param \PhpParser\Node\Expr\Cast\Unset_ $node + */ + protected function pExpr_Cast_Unset($node) { return $this->pPrefixOp(\PhpParser\Node\Expr\Cast\Unset_::class, '(unset) ', $node->expr); } // Function calls and similar constructs - protected function pExpr_FuncCall(\PhpParser\Node\Expr\FuncCall $node) + /** + * @param \PhpParser\Node\Expr\FuncCall $node + */ + protected function pExpr_FuncCall($node) { return $this->pCallLhs($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_MethodCall(\PhpParser\Node\Expr\MethodCall $node) + /** + * @param \PhpParser\Node\Expr\MethodCall $node + */ + protected function pExpr_MethodCall($node) { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_NullsafeMethodCall(\PhpParser\Node\Expr\NullsafeMethodCall $node) + /** + * @param \PhpParser\Node\Expr\NullsafeMethodCall $node + */ + protected function pExpr_NullsafeMethodCall($node) { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_StaticCall(\PhpParser\Node\Expr\StaticCall $node) + /** + * @param \PhpParser\Node\Expr\StaticCall $node + */ + protected function pExpr_StaticCall($node) { return $this->pDereferenceLhs($node->class) . '::' . ($node->name instanceof \PhpParser\Node\Expr ? $node->name instanceof \PhpParser\Node\Expr\Variable ? $this->p($node->name) : '{' . $this->p($node->name) . '}' : $node->name) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Empty(\PhpParser\Node\Expr\Empty_ $node) + /** + * @param \PhpParser\Node\Expr\Empty_ $node + */ + protected function pExpr_Empty($node) { return 'empty(' . $this->p($node->expr) . ')'; } - protected function pExpr_Isset(\PhpParser\Node\Expr\Isset_ $node) + /** + * @param \PhpParser\Node\Expr\Isset_ $node + */ + protected function pExpr_Isset($node) { return 'isset(' . $this->pCommaSeparated($node->vars) . ')'; } - protected function pExpr_Eval(\PhpParser\Node\Expr\Eval_ $node) + /** + * @param \PhpParser\Node\Expr\Eval_ $node + */ + protected function pExpr_Eval($node) { return 'eval(' . $this->p($node->expr) . ')'; } - protected function pExpr_Include(\PhpParser\Node\Expr\Include_ $node) + /** + * @param \PhpParser\Node\Expr\Include_ $node + */ + protected function pExpr_Include($node) { static $map = [\PhpParser\Node\Expr\Include_::TYPE_INCLUDE => 'include', \PhpParser\Node\Expr\Include_::TYPE_INCLUDE_ONCE => 'include_once', \PhpParser\Node\Expr\Include_::TYPE_REQUIRE => 'require', \PhpParser\Node\Expr\Include_::TYPE_REQUIRE_ONCE => 'require_once']; return $map[$node->type] . ' ' . $this->p($node->expr); } - protected function pExpr_List(\PhpParser\Node\Expr\List_ $node) + /** + * @param \PhpParser\Node\Expr\List_ $node + */ + protected function pExpr_List($node) { return 'list(' . $this->pCommaSeparated($node->items) . ')'; } // Other - protected function pExpr_Error(\PhpParser\Node\Expr\Error $node) + /** + * @param \PhpParser\Node\Expr\Error $node + */ + protected function pExpr_Error($node) { throw new \LogicException('Cannot pretty-print AST with Error nodes'); } - protected function pExpr_Variable(\PhpParser\Node\Expr\Variable $node) + /** + * @param \PhpParser\Node\Expr\Variable $node + */ + protected function pExpr_Variable($node) { if ($node->name instanceof \PhpParser\Node\Expr) { return '${' . $this->p($node->name) . '}'; @@ -521,7 +818,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return '$' . $node->name; } } - protected function pExpr_Array(\PhpParser\Node\Expr\Array_ $node) + /** + * @param \PhpParser\Node\Expr\Array_ $node + */ + protected function pExpr_Array($node) { $syntax = $node->getAttribute('kind', $this->options['shortArraySyntax'] ? \PhpParser\Node\Expr\Array_::KIND_SHORT : \PhpParser\Node\Expr\Array_::KIND_LONG); if ($syntax === \PhpParser\Node\Expr\Array_::KIND_SHORT) { @@ -530,59 +830,101 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return 'array(' . $this->pMaybeMultiline($node->items, \true) . ')'; } } - protected function pExpr_ArrayItem(\PhpParser\Node\Expr\ArrayItem $node) + /** + * @param \PhpParser\Node\Expr\ArrayItem $node + */ + protected function pExpr_ArrayItem($node) { return (null !== $node->key ? $this->p($node->key) . ' => ' : '') . ($node->byRef ? '&' : '') . ($node->unpack ? '...' : '') . $this->p($node->value); } - protected function pExpr_ArrayDimFetch(\PhpParser\Node\Expr\ArrayDimFetch $node) + /** + * @param \PhpParser\Node\Expr\ArrayDimFetch $node + */ + protected function pExpr_ArrayDimFetch($node) { return $this->pDereferenceLhs($node->var) . '[' . (null !== $node->dim ? $this->p($node->dim) : '') . ']'; } - protected function pExpr_ConstFetch(\PhpParser\Node\Expr\ConstFetch $node) + /** + * @param \PhpParser\Node\Expr\ConstFetch $node + */ + protected function pExpr_ConstFetch($node) { return $this->p($node->name); } - protected function pExpr_ClassConstFetch(\PhpParser\Node\Expr\ClassConstFetch $node) + /** + * @param \PhpParser\Node\Expr\ClassConstFetch $node + */ + protected function pExpr_ClassConstFetch($node) { return $this->pDereferenceLhs($node->class) . '::' . $this->p($node->name); } - protected function pExpr_PropertyFetch(\PhpParser\Node\Expr\PropertyFetch $node) + /** + * @param \PhpParser\Node\Expr\PropertyFetch $node + */ + protected function pExpr_PropertyFetch($node) { return $this->pDereferenceLhs($node->var) . '->' . $this->pObjectProperty($node->name); } - protected function pExpr_NullsafePropertyFetch(\PhpParser\Node\Expr\NullsafePropertyFetch $node) + /** + * @param \PhpParser\Node\Expr\NullsafePropertyFetch $node + */ + protected function pExpr_NullsafePropertyFetch($node) { return $this->pDereferenceLhs($node->var) . '?->' . $this->pObjectProperty($node->name); } - protected function pExpr_StaticPropertyFetch(\PhpParser\Node\Expr\StaticPropertyFetch $node) + /** + * @param \PhpParser\Node\Expr\StaticPropertyFetch $node + */ + protected function pExpr_StaticPropertyFetch($node) { return $this->pDereferenceLhs($node->class) . '::$' . $this->pObjectProperty($node->name); } - protected function pExpr_ShellExec(\PhpParser\Node\Expr\ShellExec $node) + /** + * @param \PhpParser\Node\Expr\ShellExec $node + */ + protected function pExpr_ShellExec($node) { return '`' . $this->pEncapsList($node->parts, '`') . '`'; } - protected function pExpr_Closure(\PhpParser\Node\Expr\Closure $node) + /** + * @param \PhpParser\Node\Expr\Closure $node + */ + protected function pExpr_Closure($node) { return $this->pAttrGroups($node->attrGroups, \true) . ($node->static ? 'static ' : '') . 'function ' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' . (!empty($node->uses) ? ' use(' . $this->pCommaSeparated($node->uses) . ')' : '') . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pExpr_Match(\PhpParser\Node\Expr\Match_ $node) + /** + * @param \PhpParser\Node\Expr\Match_ $node + */ + protected function pExpr_Match($node) { return 'match (' . $this->p($node->cond) . ') {' . $this->pCommaSeparatedMultiline($node->arms, \true) . $this->nl . '}'; } - protected function pMatchArm(\PhpParser\Node\MatchArm $node) + /** + * @param \PhpParser\Node\MatchArm $node + */ + protected function pMatchArm($node) { return ($node->conds ? $this->pCommaSeparated($node->conds) : 'default') . ' => ' . $this->p($node->body); } - protected function pExpr_ArrowFunction(\PhpParser\Node\Expr\ArrowFunction $node) + /** + * @param \PhpParser\Node\Expr\ArrowFunction $node + */ + protected function pExpr_ArrowFunction($node) { return $this->pAttrGroups($node->attrGroups, \true) . ($node->static ? 'static ' : '') . 'fn' . ($node->byRef ? '&' : '') . '(' . $this->pCommaSeparated($node->params) . ')' . (null !== $node->returnType ? ': ' . $this->p($node->returnType) : '') . ' => ' . $this->p($node->expr); } - protected function pExpr_ClosureUse(\PhpParser\Node\Expr\ClosureUse $node) + /** + * @param \PhpParser\Node\Expr\ClosureUse $node + */ + protected function pExpr_ClosureUse($node) { return ($node->byRef ? '&' : '') . $this->p($node->var); } - protected function pExpr_New(\PhpParser\Node\Expr\New_ $node) + /** + * @param \PhpParser\Node\Expr\New_ $node + */ + protected function pExpr_New($node) { if ($node->class instanceof \PhpParser\Node\Stmt\Class_) { $args = $node->args ? '(' . $this->pMaybeMultiline($node->args) . ')' : ''; @@ -590,26 +932,41 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return 'new ' . $this->pNewVariable($node->class) . '(' . $this->pMaybeMultiline($node->args) . ')'; } - protected function pExpr_Clone(\PhpParser\Node\Expr\Clone_ $node) + /** + * @param \PhpParser\Node\Expr\Clone_ $node + */ + protected function pExpr_Clone($node) { return 'clone ' . $this->p($node->expr); } - protected function pExpr_Ternary(\PhpParser\Node\Expr\Ternary $node) + /** + * @param \PhpParser\Node\Expr\Ternary $node + */ + protected function pExpr_Ternary($node) { // a bit of cheating: we treat the ternary as a binary op where the ?...: part is the operator. // this is okay because the part between ? and : never needs parentheses. return $this->pInfixOp(\PhpParser\Node\Expr\Ternary::class, $node->cond, ' ?' . (null !== $node->if ? ' ' . $this->p($node->if) . ' ' : '') . ': ', $node->else); } - protected function pExpr_Exit(\PhpParser\Node\Expr\Exit_ $node) + /** + * @param \PhpParser\Node\Expr\Exit_ $node + */ + protected function pExpr_Exit($node) { $kind = $node->getAttribute('kind', \PhpParser\Node\Expr\Exit_::KIND_DIE); return ($kind === \PhpParser\Node\Expr\Exit_::KIND_EXIT ? 'exit' : 'die') . (null !== $node->expr ? '(' . $this->p($node->expr) . ')' : ''); } - protected function pExpr_Throw(\PhpParser\Node\Expr\Throw_ $node) + /** + * @param \PhpParser\Node\Expr\Throw_ $node + */ + protected function pExpr_Throw($node) { return 'throw ' . $this->p($node->expr); } - protected function pExpr_Yield(\PhpParser\Node\Expr\Yield_ $node) + /** + * @param \PhpParser\Node\Expr\Yield_ $node + */ + protected function pExpr_Yield($node) { if ($node->value === null) { return 'yield'; @@ -619,7 +976,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } } // Declarations - protected function pStmt_Namespace(\PhpParser\Node\Stmt\Namespace_ $node) + /** + * @param \PhpParser\Node\Stmt\Namespace_ $node + */ + protected function pStmt_Namespace($node) { if ($this->canUseSemicolonNamespaces) { return 'namespace ' . $this->p($node->name) . ';' . $this->nl . $this->pStmts($node->stmts, \false); @@ -627,15 +987,24 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return 'namespace' . (null !== $node->name ? ' ' . $this->p($node->name) : '') . ' {' . $this->pStmts($node->stmts) . $this->nl . '}'; } } - protected function pStmt_Use(\PhpParser\Node\Stmt\Use_ $node) + /** + * @param \PhpParser\Node\Stmt\Use_ $node + */ + protected function pStmt_Use($node) { return 'use ' . $this->pUseType($node->type) . $this->pCommaSeparated($node->uses) . ';'; } - protected function pStmt_GroupUse(\PhpParser\Node\Stmt\GroupUse $node) + /** + * @param \PhpParser\Node\Stmt\GroupUse $node + */ + protected function pStmt_GroupUse($node) { return 'use ' . $this->pUseType($node->type) . $this->pName($node->prefix) . '\\{' . $this->pCommaSeparated($node->uses) . '};'; } - protected function pStmt_UseUse(\PhpParser\Node\Stmt\UseUse $node) + /** + * @param \PhpParser\Node\Stmt\UseUse $node + */ + protected function pStmt_UseUse($node) { return $this->pUseType($node->type) . $this->p($node->name) . (null !== $node->alias ? ' as ' . $node->alias : ''); } @@ -643,183 +1012,315 @@ class Standard extends \PhpParser\PrettyPrinterAbstract { return $type === \PhpParser\Node\Stmt\Use_::TYPE_FUNCTION ? 'function ' : ($type === \PhpParser\Node\Stmt\Use_::TYPE_CONSTANT ? 'const ' : ''); } - protected function pStmt_Interface(\PhpParser\Node\Stmt\Interface_ $node) + /** + * @param \PhpParser\Node\Stmt\Interface_ $node + */ + protected function pStmt_Interface($node) { return $this->pAttrGroups($node->attrGroups) . 'interface ' . $node->name . (!empty($node->extends) ? ' extends ' . $this->pCommaSeparated($node->extends) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Enum(\PhpParser\Node\Stmt\Enum_ $node) + /** + * @param \PhpParser\Node\Stmt\Enum_ $node + */ + protected function pStmt_Enum($node) { return $this->pAttrGroups($node->attrGroups) . 'enum ' . $node->name . ($node->scalarType ? " : {$node->scalarType}" : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Class(\PhpParser\Node\Stmt\Class_ $node) + /** + * @param \PhpParser\Node\Stmt\Class_ $node + */ + protected function pStmt_Class($node) { return $this->pClassCommon($node, ' ' . $node->name); } - protected function pStmt_Trait(\PhpParser\Node\Stmt\Trait_ $node) + /** + * @param \PhpParser\Node\Stmt\Trait_ $node + */ + protected function pStmt_Trait($node) { return $this->pAttrGroups($node->attrGroups) . 'trait ' . $node->name . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_EnumCase(\PhpParser\Node\Stmt\EnumCase $node) + /** + * @param \PhpParser\Node\Stmt\EnumCase $node + */ + protected function pStmt_EnumCase($node) { return $this->pAttrGroups($node->attrGroups) . 'case ' . $node->name . ($node->expr ? ' = ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_TraitUse(\PhpParser\Node\Stmt\TraitUse $node) + /** + * @param \PhpParser\Node\Stmt\TraitUse $node + */ + protected function pStmt_TraitUse($node) { return 'use ' . $this->pCommaSeparated($node->traits) . (empty($node->adaptations) ? ';' : ' {' . $this->pStmts($node->adaptations) . $this->nl . '}'); } - protected function pStmt_TraitUseAdaptation_Precedence(\PhpParser\Node\Stmt\TraitUseAdaptation\Precedence $node) + /** + * @param \PhpParser\Node\Stmt\TraitUseAdaptation\Precedence $node + */ + protected function pStmt_TraitUseAdaptation_Precedence($node) { return $this->p($node->trait) . '::' . $node->method . ' insteadof ' . $this->pCommaSeparated($node->insteadof) . ';'; } - protected function pStmt_TraitUseAdaptation_Alias(\PhpParser\Node\Stmt\TraitUseAdaptation\Alias $node) + /** + * @param \PhpParser\Node\Stmt\TraitUseAdaptation\Alias $node + */ + protected function pStmt_TraitUseAdaptation_Alias($node) { return (null !== $node->trait ? $this->p($node->trait) . '::' : '') . $node->method . ' as' . (null !== $node->newModifier ? ' ' . \rtrim($this->pModifiers($node->newModifier), ' ') : '') . (null !== $node->newName ? ' ' . $node->newName : '') . ';'; } - protected function pStmt_Property(\PhpParser\Node\Stmt\Property $node) + /** + * @param \PhpParser\Node\Stmt\Property $node + */ + protected function pStmt_Property($node) { return $this->pAttrGroups($node->attrGroups) . (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . ($node->type ? $this->p($node->type) . ' ' : '') . $this->pCommaSeparated($node->props) . ';'; } - protected function pStmt_PropertyProperty(\PhpParser\Node\Stmt\PropertyProperty $node) + /** + * @param \PhpParser\Node\Stmt\PropertyProperty $node + */ + protected function pStmt_PropertyProperty($node) { return '$' . $node->name . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_ClassMethod(\PhpParser\Node\Stmt\ClassMethod $node) + /** + * @param \PhpParser\Node\Stmt\ClassMethod $node + */ + protected function pStmt_ClassMethod($node) { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pMaybeMultiline($node->params) . ')' . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . (null !== $node->stmts ? $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_ClassConst(\PhpParser\Node\Stmt\ClassConst $node) + /** + * @param \PhpParser\Node\Stmt\ClassConst $node + */ + protected function pStmt_ClassConst($node) { return $this->pAttrGroups($node->attrGroups) . $this->pModifiers($node->flags) . 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Function(\PhpParser\Node\Stmt\Function_ $node) + /** + * @param \PhpParser\Node\Stmt\Function_ $node + */ + protected function pStmt_Function($node) { return $this->pAttrGroups($node->attrGroups) . 'function ' . ($node->byRef ? '&' : '') . $node->name . '(' . $this->pCommaSeparated($node->params) . ')' . (null !== $node->returnType ? ' : ' . $this->p($node->returnType) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Const(\PhpParser\Node\Stmt\Const_ $node) + /** + * @param \PhpParser\Node\Stmt\Const_ $node + */ + protected function pStmt_Const($node) { return 'const ' . $this->pCommaSeparated($node->consts) . ';'; } - protected function pStmt_Declare(\PhpParser\Node\Stmt\Declare_ $node) + /** + * @param \PhpParser\Node\Stmt\Declare_ $node + */ + protected function pStmt_Declare($node) { return 'declare (' . $this->pCommaSeparated($node->declares) . ')' . (null !== $node->stmts ? ' {' . $this->pStmts($node->stmts) . $this->nl . '}' : ';'); } - protected function pStmt_DeclareDeclare(\PhpParser\Node\Stmt\DeclareDeclare $node) + /** + * @param \PhpParser\Node\Stmt\DeclareDeclare $node + */ + protected function pStmt_DeclareDeclare($node) { return $node->key . '=' . $this->p($node->value); } // Control flow - protected function pStmt_If(\PhpParser\Node\Stmt\If_ $node) + /** + * @param \PhpParser\Node\Stmt\If_ $node + */ + protected function pStmt_If($node) { return 'if (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->elseifs ? ' ' . $this->pImplode($node->elseifs, ' ') : '') . (null !== $node->else ? ' ' . $this->p($node->else) : ''); } - protected function pStmt_ElseIf(\PhpParser\Node\Stmt\ElseIf_ $node) + /** + * @param \PhpParser\Node\Stmt\ElseIf_ $node + */ + protected function pStmt_ElseIf($node) { return 'elseif (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Else(\PhpParser\Node\Stmt\Else_ $node) + /** + * @param \PhpParser\Node\Stmt\Else_ $node + */ + protected function pStmt_Else($node) { return 'else {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_For(\PhpParser\Node\Stmt\For_ $node) + /** + * @param \PhpParser\Node\Stmt\For_ $node + */ + protected function pStmt_For($node) { return 'for (' . $this->pCommaSeparated($node->init) . ';' . (!empty($node->cond) ? ' ' : '') . $this->pCommaSeparated($node->cond) . ';' . (!empty($node->loop) ? ' ' : '') . $this->pCommaSeparated($node->loop) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Foreach(\PhpParser\Node\Stmt\Foreach_ $node) + /** + * @param \PhpParser\Node\Stmt\Foreach_ $node + */ + protected function pStmt_Foreach($node) { return 'foreach (' . $this->p($node->expr) . ' as ' . (null !== $node->keyVar ? $this->p($node->keyVar) . ' => ' : '') . ($node->byRef ? '&' : '') . $this->p($node->valueVar) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_While(\PhpParser\Node\Stmt\While_ $node) + /** + * @param \PhpParser\Node\Stmt\While_ $node + */ + protected function pStmt_While($node) { return 'while (' . $this->p($node->cond) . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Do(\PhpParser\Node\Stmt\Do_ $node) + /** + * @param \PhpParser\Node\Stmt\Do_ $node + */ + protected function pStmt_Do($node) { return 'do {' . $this->pStmts($node->stmts) . $this->nl . '} while (' . $this->p($node->cond) . ');'; } - protected function pStmt_Switch(\PhpParser\Node\Stmt\Switch_ $node) + /** + * @param \PhpParser\Node\Stmt\Switch_ $node + */ + protected function pStmt_Switch($node) { return 'switch (' . $this->p($node->cond) . ') {' . $this->pStmts($node->cases) . $this->nl . '}'; } - protected function pStmt_Case(\PhpParser\Node\Stmt\Case_ $node) + /** + * @param \PhpParser\Node\Stmt\Case_ $node + */ + protected function pStmt_Case($node) { return (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default') . ':' . $this->pStmts($node->stmts); } - protected function pStmt_TryCatch(\PhpParser\Node\Stmt\TryCatch $node) + /** + * @param \PhpParser\Node\Stmt\TryCatch $node + */ + protected function pStmt_TryCatch($node) { return 'try {' . $this->pStmts($node->stmts) . $this->nl . '}' . ($node->catches ? ' ' . $this->pImplode($node->catches, ' ') : '') . ($node->finally !== null ? ' ' . $this->p($node->finally) : ''); } - protected function pStmt_Catch(\PhpParser\Node\Stmt\Catch_ $node) + /** + * @param \PhpParser\Node\Stmt\Catch_ $node + */ + protected function pStmt_Catch($node) { return 'catch (' . $this->pImplode($node->types, '|') . ($node->var !== null ? ' ' . $this->p($node->var) : '') . ') {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Finally(\PhpParser\Node\Stmt\Finally_ $node) + /** + * @param \PhpParser\Node\Stmt\Finally_ $node + */ + protected function pStmt_Finally($node) { return 'finally {' . $this->pStmts($node->stmts) . $this->nl . '}'; } - protected function pStmt_Break(\PhpParser\Node\Stmt\Break_ $node) + /** + * @param \PhpParser\Node\Stmt\Break_ $node + */ + protected function pStmt_Break($node) { return 'break' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Continue(\PhpParser\Node\Stmt\Continue_ $node) + /** + * @param \PhpParser\Node\Stmt\Continue_ $node + */ + protected function pStmt_Continue($node) { return 'continue' . ($node->num !== null ? ' ' . $this->p($node->num) : '') . ';'; } - protected function pStmt_Return(\PhpParser\Node\Stmt\Return_ $node) + /** + * @param \PhpParser\Node\Stmt\Return_ $node + */ + protected function pStmt_Return($node) { return 'return' . (null !== $node->expr ? ' ' . $this->p($node->expr) : '') . ';'; } - protected function pStmt_Throw(\PhpParser\Node\Stmt\Throw_ $node) + /** + * @param \PhpParser\Node\Stmt\Throw_ $node + */ + protected function pStmt_Throw($node) { return 'throw ' . $this->p($node->expr) . ';'; } - protected function pStmt_Label(\PhpParser\Node\Stmt\Label $node) + /** + * @param \PhpParser\Node\Stmt\Label $node + */ + protected function pStmt_Label($node) { return $node->name . ':'; } - protected function pStmt_Goto(\PhpParser\Node\Stmt\Goto_ $node) + /** + * @param \PhpParser\Node\Stmt\Goto_ $node + */ + protected function pStmt_Goto($node) { return 'goto ' . $node->name . ';'; } // Other - protected function pStmt_Expression(\PhpParser\Node\Stmt\Expression $node) + /** + * @param \PhpParser\Node\Stmt\Expression $node + */ + protected function pStmt_Expression($node) { return $this->p($node->expr) . ';'; } - protected function pStmt_Echo(\PhpParser\Node\Stmt\Echo_ $node) + /** + * @param \PhpParser\Node\Stmt\Echo_ $node + */ + protected function pStmt_Echo($node) { return 'echo ' . $this->pCommaSeparated($node->exprs) . ';'; } - protected function pStmt_Static(\PhpParser\Node\Stmt\Static_ $node) + /** + * @param \PhpParser\Node\Stmt\Static_ $node + */ + protected function pStmt_Static($node) { return 'static ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_Global(\PhpParser\Node\Stmt\Global_ $node) + /** + * @param \PhpParser\Node\Stmt\Global_ $node + */ + protected function pStmt_Global($node) { return 'global ' . $this->pCommaSeparated($node->vars) . ';'; } - protected function pStmt_StaticVar(\PhpParser\Node\Stmt\StaticVar $node) + /** + * @param \PhpParser\Node\Stmt\StaticVar $node + */ + protected function pStmt_StaticVar($node) { return $this->p($node->var) . (null !== $node->default ? ' = ' . $this->p($node->default) : ''); } - protected function pStmt_Unset(\PhpParser\Node\Stmt\Unset_ $node) + /** + * @param \PhpParser\Node\Stmt\Unset_ $node + */ + protected function pStmt_Unset($node) { return 'unset(' . $this->pCommaSeparated($node->vars) . ');'; } - protected function pStmt_InlineHTML(\PhpParser\Node\Stmt\InlineHTML $node) + /** + * @param \PhpParser\Node\Stmt\InlineHTML $node + */ + protected function pStmt_InlineHTML($node) { $newline = $node->getAttribute('hasLeadingNewline', \true) ? "\n" : ''; return '?>' . $newline . $node->value . 'remaining; } - protected function pStmt_Nop(\PhpParser\Node\Stmt\Nop $node) + /** + * @param \PhpParser\Node\Stmt\Nop $node + */ + protected function pStmt_Nop($node) { return ''; } // Helpers - protected function pClassCommon(\PhpParser\Node\Stmt\Class_ $node, $afterClassToken) + /** + * @param \PhpParser\Node\Stmt\Class_ $node + */ + protected function pClassCommon($node, $afterClassToken) { return $this->pAttrGroups($node->attrGroups, $node->name === null) . $this->pModifiers($node->flags) . 'class' . $afterClassToken . (null !== $node->extends ? ' extends ' . $this->p($node->extends) : '') . (!empty($node->implements) ? ' implements ' . $this->pCommaSeparated($node->implements) : '') . $this->nl . '{' . $this->pStmts($node->stmts) . $this->nl . '}'; } @@ -831,7 +1332,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return $node; } } - protected function pEncapsList(array $encapsList, $quote) + /** + * @param mixed[] $encapsList + */ + protected function pEncapsList($encapsList, $quote) { $return = ''; foreach ($encapsList as $element) { @@ -843,7 +1347,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return $return; } - protected function pSingleQuotedString(string $string) + /** + * @param string $string + */ + protected function pSingleQuotedString($string) { return '\'' . \addcslashes($string, '\'\\') . '\''; } @@ -884,7 +1391,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract $end = $atEnd ? '(?:$|[;\\r\\n])' : '[;\\r\\n]'; return \false !== \strpos($string, $label) && \preg_match('/' . $start . $label . $end . '/', $string); } - protected function encapsedContainsEndLabel(array $parts, $label) + /** + * @param mixed[] $parts + */ + protected function encapsedContainsEndLabel($parts, $label) { foreach ($parts as $i => $part) { $atStart = $i === 0; @@ -895,7 +1405,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return \false; } - protected function pDereferenceLhs(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function pDereferenceLhs($node) { if (!$this->dereferenceLhsRequiresParens($node)) { return $this->p($node); @@ -903,7 +1416,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return '(' . $this->p($node) . ')'; } } - protected function pCallLhs(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function pCallLhs($node) { if (!$this->callLhsRequiresParens($node)) { return $this->p($node); @@ -911,7 +1427,10 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return '(' . $this->p($node) . ')'; } } - protected function pNewVariable(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function pNewVariable($node) { // TODO: This is not fully accurate. return $this->pDereferenceLhs($node); @@ -920,7 +1439,7 @@ class Standard extends \PhpParser\PrettyPrinterAbstract * @param Node[] $nodes * @return bool */ - protected function hasNodeWithComments(array $nodes) + protected function hasNodeWithComments($nodes) { foreach ($nodes as $node) { if ($node && $node->getComments()) { @@ -929,7 +1448,11 @@ class Standard extends \PhpParser\PrettyPrinterAbstract } return \false; } - protected function pMaybeMultiline(array $nodes, bool $trailingComma = \false) + /** + * @param mixed[] $nodes + * @param bool $trailingComma + */ + protected function pMaybeMultiline($nodes, $trailingComma = \false) { if (!$this->hasNodeWithComments($nodes)) { return $this->pCommaSeparated($nodes); @@ -937,7 +1460,11 @@ class Standard extends \PhpParser\PrettyPrinterAbstract return $this->pCommaSeparatedMultiline($nodes, $trailingComma) . $this->nl; } } - protected function pAttrGroups(array $nodes, bool $inline = \false) : string + /** + * @param mixed[] $nodes + * @param bool $inline + */ + protected function pAttrGroups($nodes, $inline = \false) : string { $result = ''; $sep = $inline ? ' ' : $this->nl; diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index b574ba01908..f32c1517f07 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -167,7 +167,7 @@ abstract class PrettyPrinterAbstract * * @param int $level Level in number of spaces */ - protected function setIndentLevel(int $level) + protected function setIndentLevel($level) { $this->indentLevel = $level; $this->nl = "\n" . \str_repeat(' ', $level); @@ -196,7 +196,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrint(array $stmts) : string + public function prettyPrint($stmts) : string { $this->resetState(); $this->preprocessNodes($stmts); @@ -209,7 +209,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed node */ - public function prettyPrintExpr(\PhpParser\Node\Expr $node) : string + public function prettyPrintExpr($node) : string { $this->resetState(); return $this->handleMagicTokens($this->p($node)); @@ -221,7 +221,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - public function prettyPrintFile(array $stmts) : string + public function prettyPrintFile($stmts) : string { if (!$stmts) { return "canUseSemicolonNamespaces = \true; @@ -257,7 +257,7 @@ abstract class PrettyPrinterAbstract * @param string $str * @return string */ - protected function handleMagicTokens(string $str) : string + protected function handleMagicTokens($str) : string { // Replace doc-string-end tokens with nothing or a newline $str = \str_replace($this->docStringEndToken . ";\n", ";\n", $str); @@ -272,7 +272,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed statements */ - protected function pStmts(array $nodes, bool $indent = \true) : string + protected function pStmts($nodes, $indent = \true) : string { if ($indent) { $this->indent(); @@ -303,7 +303,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed infix operation */ - protected function pInfixOp(string $class, \PhpParser\Node $leftNode, string $operatorString, \PhpParser\Node $rightNode) : string + protected function pInfixOp($class, $leftNode, $operatorString, $rightNode) : string { list($precedence, $associativity) = $this->precedenceMap[$class]; return $this->pPrec($leftNode, $precedence, $associativity, -1) . $operatorString . $this->pPrec($rightNode, $precedence, $associativity, 1); @@ -317,7 +317,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed prefix operation */ - protected function pPrefixOp(string $class, string $operatorString, \PhpParser\Node $node) : string + protected function pPrefixOp($class, $operatorString, $node) : string { list($precedence, $associativity) = $this->precedenceMap[$class]; return $operatorString . $this->pPrec($node, $precedence, $associativity, 1); @@ -331,7 +331,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed postfix operation */ - protected function pPostfixOp(string $class, \PhpParser\Node $node, string $operatorString) : string + protected function pPostfixOp($class, $node, $operatorString) : string { list($precedence, $associativity) = $this->precedenceMap[$class]; return $this->pPrec($node, $precedence, $associativity, -1) . $operatorString; @@ -348,7 +348,7 @@ abstract class PrettyPrinterAbstract * * @return string The pretty printed node */ - protected function pPrec(\PhpParser\Node $node, int $parentPrecedence, int $parentAssociativity, int $childPosition) : string + protected function pPrec($node, $parentPrecedence, $parentAssociativity, $childPosition) : string { $class = \get_class($node); if (isset($this->precedenceMap[$class])) { @@ -367,7 +367,7 @@ abstract class PrettyPrinterAbstract * * @return string Imploded pretty printed nodes */ - protected function pImplode(array $nodes, string $glue = '') : string + protected function pImplode($nodes, $glue = '') : string { $pNodes = []; foreach ($nodes as $node) { @@ -386,7 +386,7 @@ abstract class PrettyPrinterAbstract * * @return string Comma separated pretty printed nodes */ - protected function pCommaSeparated(array $nodes) : string + protected function pCommaSeparated($nodes) : string { return $this->pImplode($nodes, ', '); } @@ -400,7 +400,7 @@ abstract class PrettyPrinterAbstract * * @return string Comma separated pretty printed nodes in multiline style */ - protected function pCommaSeparatedMultiline(array $nodes, bool $trailingComma) : string + protected function pCommaSeparatedMultiline($nodes, $trailingComma) : string { $this->indent(); $result = ''; @@ -429,7 +429,7 @@ abstract class PrettyPrinterAbstract * * @return string Reformatted text of comments */ - protected function pComments(array $comments) : string + protected function pComments($comments) : string { $formattedComments = []; foreach ($comments as $comment) { @@ -454,7 +454,7 @@ abstract class PrettyPrinterAbstract * * @return string */ - public function printFormatPreserving(array $stmts, array $origStmts, array $origTokens) : string + public function printFormatPreserving($stmts, $origStmts, $origTokens) : string { $this->initializeNodeListDiffer(); $this->initializeLabelCharMap(); @@ -478,7 +478,10 @@ abstract class PrettyPrinterAbstract } return \ltrim($this->handleMagicTokens($result)); } - protected function pFallback(\PhpParser\Node $node) + /** + * @param \PhpParser\Node $node + */ + protected function pFallback($node) { return $this->{'p' . $node->getType()}($node); } @@ -492,7 +495,7 @@ abstract class PrettyPrinterAbstract * * @return string Pretty printed node */ - protected function p(\PhpParser\Node $node, $parentFormatPreserved = \false) : string + protected function p($node, $parentFormatPreserved = \false) : string { // No orig tokens means this is a normal pretty print without preservation of formatting if (!$this->origTokens) { @@ -637,7 +640,7 @@ abstract class PrettyPrinterAbstract * * @return null|string Result of pretty print or null if cannot preserve formatting */ - protected function pArray(array $nodes, array $origNodes, int &$pos, int $indentAdjustment, string $parentNodeType, string $subNodeName, $fixup) + protected function pArray($nodes, $origNodes, &$pos, $indentAdjustment, $parentNodeType, $subNodeName, $fixup) { $diff = $this->nodeListDiffer->diffWithReplacements($origNodes, $nodes); $mapKey = $parentNodeType . '->' . $subNodeName; @@ -846,7 +849,7 @@ abstract class PrettyPrinterAbstract * * @return string Result of fixed-up print of subnode */ - protected function pFixup(int $fixup, \PhpParser\Node $subNode, $parentClass, int $subStartPos, int $subEndPos) : string + protected function pFixup($fixup, $subNode, $parentClass, $subStartPos, $subEndPos) : string { switch ($fixup) { case self::FIXUP_PREC_LEFT: @@ -892,7 +895,7 @@ abstract class PrettyPrinterAbstract * @param string $str * @param string $append */ - protected function safeAppend(string &$str, string $append) + protected function safeAppend(&$str, $append) { if ($str === "") { $str = $append; @@ -914,7 +917,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether parentheses are required */ - protected function callLhsRequiresParens(\PhpParser\Node $node) : bool + protected function callLhsRequiresParens($node) : bool { return !($node instanceof \PhpParser\Node\Name || $node instanceof \PhpParser\Node\Expr\Variable || $node instanceof \PhpParser\Node\Expr\ArrayDimFetch || $node instanceof \PhpParser\Node\Expr\FuncCall || $node instanceof \PhpParser\Node\Expr\MethodCall || $node instanceof \PhpParser\Node\Expr\NullsafeMethodCall || $node instanceof \PhpParser\Node\Expr\StaticCall || $node instanceof \PhpParser\Node\Expr\Array_); } @@ -925,7 +928,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether parentheses are required */ - protected function dereferenceLhsRequiresParens(\PhpParser\Node $node) : bool + protected function dereferenceLhsRequiresParens($node) : bool { return !($node instanceof \PhpParser\Node\Expr\Variable || $node instanceof \PhpParser\Node\Name || $node instanceof \PhpParser\Node\Expr\ArrayDimFetch || $node instanceof \PhpParser\Node\Expr\PropertyFetch || $node instanceof \PhpParser\Node\Expr\NullsafePropertyFetch || $node instanceof \PhpParser\Node\Expr\StaticPropertyFetch || $node instanceof \PhpParser\Node\Expr\FuncCall || $node instanceof \PhpParser\Node\Expr\MethodCall || $node instanceof \PhpParser\Node\Expr\NullsafeMethodCall || $node instanceof \PhpParser\Node\Expr\StaticCall || $node instanceof \PhpParser\Node\Expr\Array_ || $node instanceof \PhpParser\Node\Scalar\String_ || $node instanceof \PhpParser\Node\Expr\ConstFetch || $node instanceof \PhpParser\Node\Expr\ClassConstFetch); } @@ -936,7 +939,7 @@ abstract class PrettyPrinterAbstract * * @return string Printed modifiers */ - protected function pModifiers(int $modifiers) + protected function pModifiers($modifiers) { return ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC ? 'public ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_PROTECTED ? 'protected ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_PRIVATE ? 'private ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_STATIC ? 'static ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_ABSTRACT ? 'abstract ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_FINAL ? 'final ' : '') . ($modifiers & \PhpParser\Node\Stmt\Class_::MODIFIER_READONLY ? 'readonly ' : ''); } @@ -947,7 +950,7 @@ abstract class PrettyPrinterAbstract * * @return bool Whether multiline formatting is used */ - protected function isMultiline(array $nodes) : bool + protected function isMultiline($nodes) : bool { if (\count($nodes) < 2) { return \false; diff --git a/vendor/phpstan/phpdoc-parser/src/Ast/Node.php b/vendor/phpstan/phpdoc-parser/src/Ast/Node.php index 2efaf819d93..09a873f4c98 100644 --- a/vendor/phpstan/phpdoc-parser/src/Ast/Node.php +++ b/vendor/phpstan/phpdoc-parser/src/Ast/Node.php @@ -10,11 +10,14 @@ interface Node * @param string $key * @param mixed $value */ - public function setAttribute(string $key, $value) : void; - public function hasAttribute(string $key) : bool; + public function setAttribute($key, $value) : void; + /** + * @param string $key + */ + public function hasAttribute($key) : bool; /** * @param string $key * @return mixed */ - public function getAttribute(string $key); + public function getAttribute($key); } diff --git a/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php b/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php index 6916d683b19..2caa6a59f93 100644 --- a/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php +++ b/vendor/phpstan/phpdoc-parser/src/Ast/NodeAttributes.php @@ -11,11 +11,14 @@ trait NodeAttributes * @param string $key * @param mixed $value */ - public function setAttribute(string $key, $value) : void + public function setAttribute($key, $value) : void { $this->attributes[$key] = $value; } - public function hasAttribute(string $key) : bool + /** + * @param string $key + */ + public function hasAttribute($key) : bool { return \array_key_exists($key, $this->attributes); } @@ -23,7 +26,7 @@ trait NodeAttributes * @param string $key * @return mixed */ - public function getAttribute(string $key) + public function getAttribute($key) { if ($this->hasAttribute($key)) { return $this->attributes[$key]; diff --git a/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php b/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php index bfd012ccce0..98f1dbe83fd 100644 --- a/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php +++ b/vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/PhpDocNode.php @@ -30,7 +30,7 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node * @param string $tagName * @return PhpDocTagNode[] */ - public function getTagsByName(string $tagName) : array + public function getTagsByName($tagName) : array { return \array_filter($this->getTags(), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) use($tagName) : bool { return $tag->name === $tagName; @@ -38,8 +38,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return VarTagValueNode[] + * @param string $tagName */ - public function getVarTagValues(string $tagName = '@var') : array + public function getVarTagValues($tagName = '@var') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode; @@ -47,8 +48,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return ParamTagValueNode[] + * @param string $tagName */ - public function getParamTagValues(string $tagName = '@param') : array + public function getParamTagValues($tagName = '@param') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode; @@ -56,8 +58,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return TemplateTagValueNode[] + * @param string $tagName */ - public function getTemplateTagValues(string $tagName = '@template') : array + public function getTemplateTagValues($tagName = '@template') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TemplateTagValueNode; @@ -65,8 +68,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return ExtendsTagValueNode[] + * @param string $tagName */ - public function getExtendsTagValues(string $tagName = '@extends') : array + public function getExtendsTagValues($tagName = '@extends') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ExtendsTagValueNode; @@ -74,8 +78,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return ImplementsTagValueNode[] + * @param string $tagName */ - public function getImplementsTagValues(string $tagName = '@implements') : array + public function getImplementsTagValues($tagName = '@implements') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ImplementsTagValueNode; @@ -83,8 +88,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return UsesTagValueNode[] + * @param string $tagName */ - public function getUsesTagValues(string $tagName = '@use') : array + public function getUsesTagValues($tagName = '@use') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\UsesTagValueNode; @@ -92,8 +98,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return ReturnTagValueNode[] + * @param string $tagName */ - public function getReturnTagValues(string $tagName = '@return') : array + public function getReturnTagValues($tagName = '@return') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ReturnTagValueNode; @@ -101,8 +108,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return ThrowsTagValueNode[] + * @param string $tagName */ - public function getThrowsTagValues(string $tagName = '@throws') : array + public function getThrowsTagValues($tagName = '@throws') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ThrowsTagValueNode; @@ -110,8 +118,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return MixinTagValueNode[] + * @param string $tagName */ - public function getMixinTagValues(string $tagName = '@mixin') : array + public function getMixinTagValues($tagName = '@mixin') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\MixinTagValueNode; @@ -128,8 +137,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return PropertyTagValueNode[] + * @param string $tagName */ - public function getPropertyTagValues(string $tagName = '@property') : array + public function getPropertyTagValues($tagName = '@property') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode; @@ -137,8 +147,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return PropertyTagValueNode[] + * @param string $tagName */ - public function getPropertyReadTagValues(string $tagName = '@property-read') : array + public function getPropertyReadTagValues($tagName = '@property-read') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode; @@ -146,8 +157,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return PropertyTagValueNode[] + * @param string $tagName */ - public function getPropertyWriteTagValues(string $tagName = '@property-write') : array + public function getPropertyWriteTagValues($tagName = '@property-write') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\PropertyTagValueNode; @@ -155,8 +167,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return MethodTagValueNode[] + * @param string $tagName */ - public function getMethodTagValues(string $tagName = '@method') : array + public function getMethodTagValues($tagName = '@method') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\MethodTagValueNode; @@ -164,8 +177,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return TypeAliasTagValueNode[] + * @param string $tagName */ - public function getTypeAliasTagValues(string $tagName = '@phpstan-type') : array + public function getTypeAliasTagValues($tagName = '@phpstan-type') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasTagValueNode; @@ -173,8 +187,9 @@ class PhpDocNode implements \PHPStan\PhpDocParser\Ast\Node } /** * @return TypeAliasImportTagValueNode[] + * @param string $tagName */ - public function getTypeAliasImportTagValues(string $tagName = '@phpstan-import-type') : array + public function getTypeAliasImportTagValues($tagName = '@phpstan-import-type') : array { return \array_column(\array_filter($this->getTagsByName($tagName), static function (\PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagNode $tag) : bool { return $tag->value instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\TypeAliasImportTagValueNode; diff --git a/vendor/psr/log/src/LoggerInterface.php b/vendor/psr/log/src/LoggerInterface.php index 63ce682416d..101e078bb7c 100644 --- a/vendor/psr/log/src/LoggerInterface.php +++ b/vendor/psr/log/src/LoggerInterface.php @@ -27,7 +27,7 @@ interface LoggerInterface * * @return void */ - public function emergency($message, array $context = []); + public function emergency($message, $context = []); /** * Action must be taken immediately. * @@ -39,7 +39,7 @@ interface LoggerInterface * * @return void */ - public function alert($message, array $context = []); + public function alert($message, $context = []); /** * Critical conditions. * @@ -50,7 +50,7 @@ interface LoggerInterface * * @return void */ - public function critical($message, array $context = []); + public function critical($message, $context = []); /** * Runtime errors that do not require immediate action but should typically * be logged and monitored. @@ -60,7 +60,7 @@ interface LoggerInterface * * @return void */ - public function error($message, array $context = []); + public function error($message, $context = []); /** * Exceptional occurrences that are not errors. * @@ -72,7 +72,7 @@ interface LoggerInterface * * @return void */ - public function warning($message, array $context = []); + public function warning($message, $context = []); /** * Normal but significant events. * @@ -81,7 +81,7 @@ interface LoggerInterface * * @return void */ - public function notice($message, array $context = []); + public function notice($message, $context = []); /** * Interesting events. * @@ -92,7 +92,7 @@ interface LoggerInterface * * @return void */ - public function info($message, array $context = []); + public function info($message, $context = []); /** * Detailed debug information. * @@ -101,7 +101,7 @@ interface LoggerInterface * * @return void */ - public function debug($message, array $context = []); + public function debug($message, $context = []); /** * Logs with an arbitrary level. * @@ -113,5 +113,5 @@ interface LoggerInterface * * @throws \Psr\Log\InvalidArgumentException */ - public function log($level, $message, array $context = []); + public function log($level, $message, $context = []); } diff --git a/vendor/psr/log/src/NullLogger.php b/vendor/psr/log/src/NullLogger.php index 0b888317fb2..0b7266cb948 100644 --- a/vendor/psr/log/src/NullLogger.php +++ b/vendor/psr/log/src/NullLogger.php @@ -23,7 +23,7 @@ class NullLogger extends \RectorPrefix20211210\Psr\Log\AbstractLogger * * @throws \Psr\Log\InvalidArgumentException */ - public function log($level, $message, array $context = []) + public function log($level, $message, $context = []) { // noop } diff --git a/vendor/rector/rector-cakephp/src/Rector/MethodCall/ArrayToFluentCallRector.php b/vendor/rector/rector-cakephp/src/Rector/MethodCall/ArrayToFluentCallRector.php index 18ca99a02d1..da7d085e561 100644 --- a/vendor/rector/rector-cakephp/src/Rector/MethodCall/ArrayToFluentCallRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/MethodCall/ArrayToFluentCallRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $factoryMethod = $this->matchTypeAndMethodName($node); if (!$factoryMethod instanceof \Rector\CakePHP\ValueObject\FactoryMethod) { @@ -95,7 +95,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $arraysToFluentCalls = $configuration[self::ARRAYS_TO_FLUENT_CALLS] ?? []; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($arraysToFluentCalls); diff --git a/vendor/rector/rector-cakephp/src/Rector/MethodCall/ModalToGetSetRector.php b/vendor/rector/rector-cakephp/src/Rector/MethodCall/ModalToGetSetRector.php index 3864391e671..4bd726fb76a 100644 --- a/vendor/rector/rector-cakephp/src/Rector/MethodCall/ModalToGetSetRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/MethodCall/ModalToGetSetRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $unprefixedMethodToGetSet = $this->matchTypeAndMethodName($node); if (!$unprefixedMethodToGetSet instanceof \Rector\CakePHP\ValueObject\ModalToGetSet) { @@ -74,7 +74,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $unprefixedMethodsToGetSet = $configuration[self::UNPREFIXED_METHODS_TO_GET_SET] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($unprefixedMethodsToGetSet); diff --git a/vendor/rector/rector-cakephp/src/Rector/MethodCall/RemoveIntermediaryMethodRector.php b/vendor/rector/rector-cakephp/src/Rector/MethodCall/RemoveIntermediaryMethodRector.php index bf08a018e6b..197e6fdd72d 100644 --- a/vendor/rector/rector-cakephp/src/Rector/MethodCall/RemoveIntermediaryMethodRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/MethodCall/RemoveIntermediaryMethodRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $replacement = $this->matchTypeAndMethodName($node); if (!$replacement instanceof \Rector\CakePHP\ValueObject\RemoveIntermediaryMethod) { @@ -72,7 +72,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $removeIntermediaryMethods = $configuration[self::REMOVE_INTERMEDIARY_METHOD] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($removeIntermediaryMethods); diff --git a/vendor/rector/rector-cakephp/src/Rector/MethodCall/RenameMethodCallBasedOnParameterRector.php b/vendor/rector/rector-cakephp/src/Rector/MethodCall/RenameMethodCallBasedOnParameterRector.php index 4c646184d7a..ee317f69259 100644 --- a/vendor/rector/rector-cakephp/src/Rector/MethodCall/RenameMethodCallBasedOnParameterRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/MethodCall/RenameMethodCallBasedOnParameterRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callWithParamRename = $this->matchTypeAndMethodName($node); if (!$callWithParamRename instanceof \Rector\CakePHP\ValueObject\RenameMethodCallBasedOnParameter) { @@ -67,7 +67,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $callsWithParamRenames = $configuration[self::CALLS_WITH_PARAM_RENAMES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($callsWithParamRenames); diff --git a/vendor/rector/rector-cakephp/src/Rector/Namespace_/AppUsesStaticCallToUseStatementRector.php b/vendor/rector/rector-cakephp/src/Rector/Namespace_/AppUsesStaticCallToUseStatementRector.php index 405f5c917f6..d0864f1317a 100644 --- a/vendor/rector/rector-cakephp/src/Rector/Namespace_/AppUsesStaticCallToUseStatementRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/Namespace_/AppUsesStaticCallToUseStatementRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class, \PhpParser\Node\Stmt\Namespace_::class]; } /** - * @param FileWithoutNamespace|Namespace_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $appUsesStaticCalls = $this->collectAppUseStaticCalls($node); if ($appUsesStaticCalls === []) { diff --git a/vendor/rector/rector-cakephp/src/Rector/Property/ChangeSnakedFixtureNameToPascalRector.php b/vendor/rector/rector-cakephp/src/Rector/Property/ChangeSnakedFixtureNameToPascalRector.php index 8ad0a7faf4a..9a9236c6794 100644 --- a/vendor/rector/rector-cakephp/src/Rector/Property/ChangeSnakedFixtureNameToPascalRector.php +++ b/vendor/rector/rector-cakephp/src/Rector/Property/ChangeSnakedFixtureNameToPascalRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { diff --git a/vendor/rector/rector-doctrine/src/Rector/ClassMethod/MakeEntitySetterNullabilityInSyncWithPropertyRector.php b/vendor/rector/rector-doctrine/src/Rector/ClassMethod/MakeEntitySetterNullabilityInSyncWithPropertyRector.php index 810acb74469..1dfc813a3b0 100644 --- a/vendor/rector/rector-doctrine/src/Rector/ClassMethod/MakeEntitySetterNullabilityInSyncWithPropertyRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/ClassMethod/MakeEntitySetterNullabilityInSyncWithPropertyRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // is setter in doctrine? if (!$this->doctrineDocBlockResolver->isInDoctrineEntityClass($node)) { diff --git a/vendor/rector/rector-doctrine/src/Rector/ClassMethod/ServiceEntityRepositoryParentCallToDIRector.php b/vendor/rector/rector-doctrine/src/Rector/ClassMethod/ServiceEntityRepositoryParentCallToDIRector.php index 6d74d088f80..ac08fe1daca 100644 --- a/vendor/rector/rector-doctrine/src/Rector/ClassMethod/ServiceEntityRepositoryParentCallToDIRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/ClassMethod/ServiceEntityRepositoryParentCallToDIRector.php @@ -105,13 +105,13 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node * * For reference, possible manager registry param types: * - Doctrine\Common\Persistence\ManagerRegistry * - Doctrine\Persistence\ManagerRegistry */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClassMethod($node)) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php index 0e685828d53..467e245f8f8 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/AddEntityIdByConditionRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; @@ -102,7 +102,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $detectTraits = $configuration[self::DETECTED_TRAITS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($detectTraits); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/BlameableBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/BlameableBehaviorRector.php index da1b0713ab8..f20644d3dd5 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/BlameableBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/BlameableBehaviorRector.php @@ -91,9 +91,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isGedmoBlameableClass($node)) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php index dca0f1da376..09814888d45 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/ClassAnnotationToNamedArgumentConstructorRector.php @@ -112,9 +112,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php index e47bce89a24..9a5f83972ad 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/InitializeDefaultEntityCollectionRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $kind = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::KIND); if ($kind === 'initialized') { diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/LoggableBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/LoggableBehaviorRector.php index 9fc551e2545..47b5864f870 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/LoggableBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/LoggableBehaviorRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Stmt\Property::class]; } /** - * @param Class_|Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Class_) { return $this->refactorClass($node); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php index 41f466b84ee..2483c0dc789 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/ManagerRegistryGetManagerToEntityManagerRector.php @@ -109,9 +109,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $constructorClassMethod = $node->getMethod(\Rector\Core\ValueObject\MethodName::CONSTRUCT); if (!$constructorClassMethod instanceof \PhpParser\Node\Stmt\ClassMethod) { diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php index c5b7ae582a1..ec0ab895197 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/MoveCurrentDateTimeDefaultInEntityToConstructorRector.php @@ -89,9 +89,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($node->getProperties() as $property) { $this->refactorProperty($property, $node); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php index ff2dfb8675b..0f077f4599d 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/MoveRepositoryFromParentToConstructorRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Doctrine\\ORM\\EntityRepository'))) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRedundantDefaultClassAnnotationValuesRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRedundantDefaultClassAnnotationValuesRector.php index d35ed3f2093..2a0474b067c 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRedundantDefaultClassAnnotationValuesRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRedundantDefaultClassAnnotationValuesRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->refactorClassAnnotations($node); return $node; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRepositoryFromEntityAnnotationRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRepositoryFromEntityAnnotationRector.php index d19fb4a3567..5ea30e7c845 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRepositoryFromEntityAnnotationRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/RemoveRepositoryFromEntityAnnotationRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Doctrine\\ORM\\Mapping\\Entity'); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/SluggableBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/SluggableBehaviorRector.php index ccd868c4a62..8e63225271e 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/SluggableBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/SluggableBehaviorRector.php @@ -91,9 +91,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $slugFields = []; $matchedProperty = null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/SoftDeletableBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/SoftDeletableBehaviorRector.php index 40ee0c90f6e..f348fe28cc9 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/SoftDeletableBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/SoftDeletableBehaviorRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Gedmo\\Mapping\\Annotation\\SoftDeleteable'); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/TimestampableBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/TimestampableBehaviorRector.php index 8e0aa9d049b..f1bfff0e126 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/TimestampableBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/TimestampableBehaviorRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->classManipulator->hasTrait($node, 'Gedmo\\Timestampable\\Traits\\TimestampableEntity')) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/TranslationBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/TranslationBehaviorRector.php index 383186825bc..3f9702c19e1 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/TranslationBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/TranslationBehaviorRector.php @@ -124,9 +124,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classType = $this->nodeTypeResolver->getType($node); $translatableObjectType = new \PHPStan\Type\ObjectType('Gedmo\\Translatable\\Translatable'); diff --git a/vendor/rector/rector-doctrine/src/Rector/Class_/TreeBehaviorRector.php b/vendor/rector/rector-doctrine/src/Rector/Class_/TreeBehaviorRector.php index 08602888034..11cfd3d1670 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Class_/TreeBehaviorRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Class_/TreeBehaviorRector.php @@ -123,9 +123,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $propertyPhpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $propertyPhpDocInfo->getByAnnotationClass('Gedmo\\Mapping\\Annotation\\Tree'); diff --git a/vendor/rector/rector-doctrine/src/Rector/MethodCall/ChangeSetParametersArrayToArrayCollectionRector.php b/vendor/rector/rector-doctrine/src/Rector/MethodCall/ChangeSetParametersArrayToArrayCollectionRector.php index 1472001922a..b5e0f66f7e7 100644 --- a/vendor/rector/rector-doctrine/src/Rector/MethodCall/ChangeSetParametersArrayToArrayCollectionRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/MethodCall/ChangeSetParametersArrayToArrayCollectionRector.php @@ -46,9 +46,9 @@ final class ChangeSetParametersArrayToArrayCollectionRector extends \Rector\Core return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipMethodCall($node)) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/MethodCall/EntityAliasToClassConstantReferenceRector.php b/vendor/rector/rector-doctrine/src/Rector/MethodCall/EntityAliasToClassConstantReferenceRector.php index 7805a049b19..598f42d32d5 100644 --- a/vendor/rector/rector-doctrine/src/Rector/MethodCall/EntityAliasToClassConstantReferenceRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/MethodCall/EntityAliasToClassConstantReferenceRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isObjectTypes($node->var, $this->doctrineManagerRegistryObjectTypes)) { return null; @@ -81,7 +81,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $aliasesToNamespaces = $configuration[self::ALIASES_TO_NAMESPACES] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($aliasesToNamespaces); diff --git a/vendor/rector/rector-doctrine/src/Rector/MethodCall/ReplaceParentRepositoryCallsByRepositoryPropertyRector.php b/vendor/rector/rector-doctrine/src/Rector/MethodCall/ReplaceParentRepositoryCallsByRepositoryPropertyRector.php index 5790fd145ba..a0e0e393743 100644 --- a/vendor/rector/rector-doctrine/src/Rector/MethodCall/ReplaceParentRepositoryCallsByRepositoryPropertyRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/MethodCall/ReplaceParentRepositoryCallsByRepositoryPropertyRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Doctrine\\ORM\\EntityRepository'))) { return null; diff --git a/vendor/rector/rector-doctrine/src/Rector/Property/ChangeBigIntEntityPropertyToIntTypeRector.php b/vendor/rector/rector-doctrine/src/Rector/Property/ChangeBigIntEntityPropertyToIntTypeRector.php index e3f8f8dcb7b..fe47ad293f5 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Property/ChangeBigIntEntityPropertyToIntTypeRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Property/ChangeBigIntEntityPropertyToIntTypeRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Doctrine\\ORM\\Mapping\\Column'); diff --git a/vendor/rector/rector-doctrine/src/Rector/Property/CorrectDefaultTypesOnEntityPropertyRector.php b/vendor/rector/rector-doctrine/src/Rector/Property/CorrectDefaultTypesOnEntityPropertyRector.php index ce0c99d3dc7..1c2e495e1eb 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Property/CorrectDefaultTypesOnEntityPropertyRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Property/CorrectDefaultTypesOnEntityPropertyRector.php @@ -60,9 +60,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Doctrine\\ORM\\Mapping\\Column'); diff --git a/vendor/rector/rector-doctrine/src/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php b/vendor/rector/rector-doctrine/src/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php index 1052066de71..be4695ffdfb 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php @@ -108,9 +108,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param Property|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Property) { return $this->refactorProperty($node); diff --git a/vendor/rector/rector-doctrine/src/Rector/Property/MakeEntityDateTimePropertyDateTimeInterfaceRector.php b/vendor/rector/rector-doctrine/src/Rector/Property/MakeEntityDateTimePropertyDateTimeInterfaceRector.php index aa3553d0a1b..4a8baa40817 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Property/MakeEntityDateTimePropertyDateTimeInterfaceRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Property/MakeEntityDateTimePropertyDateTimeInterfaceRector.php @@ -83,9 +83,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $inferredType = $this->propertyTypeInferer->inferProperty($node); if ($inferredType instanceof \PHPStan\Type\UnionType) { diff --git a/vendor/rector/rector-doctrine/src/Rector/Property/RemoveRedundantDefaultPropertyAnnotationValuesRector.php b/vendor/rector/rector-doctrine/src/Rector/Property/RemoveRedundantDefaultPropertyAnnotationValuesRector.php index 1f8b5ac51cb..3a2d45c00e6 100644 --- a/vendor/rector/rector-doctrine/src/Rector/Property/RemoveRedundantDefaultPropertyAnnotationValuesRector.php +++ b/vendor/rector/rector-doctrine/src/Rector/Property/RemoveRedundantDefaultPropertyAnnotationValuesRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->refactorPropertyAnnotations($node); return $node; diff --git a/vendor/rector/rector-laravel/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php b/vendor/rector/rector-laravel/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php index a5f4d3e11e2..46f169cfd2f 100644 --- a/vendor/rector/rector-laravel/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Assign/CallOnAppArrayAccessToStandaloneAssignRector.php @@ -41,9 +41,9 @@ final class CallOnAppArrayAccessToStandaloneAssignRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\MethodCall) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php index 3904385c752..4fb5338878c 100644 --- a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php +++ b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddArgumentDefaultValueRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : \PhpParser\Node\Stmt\ClassMethod + public function refactor($node) : \PhpParser\Node\Stmt\ClassMethod { foreach ($this->addedArguments as $addedArgument) { if (!$this->nodeTypeResolver->isObjectType($node, $addedArgument->getObjectType())) { @@ -80,7 +80,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $addedArguments = $configuration[self::ADDED_ARGUMENTS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($addedArguments); diff --git a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php index 5d8138347c1..1a3a8ebb40a 100644 --- a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php +++ b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentBootToModelClassMethodRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { diff --git a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php index 3f428bf75c4..5bd8dbf629a 100644 --- a/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php +++ b/vendor/rector/rector-laravel/src/Rector/ClassMethod/AddParentRegisterToEventServiceProviderRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { diff --git a/vendor/rector/rector-laravel/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php b/vendor/rector/rector-laravel/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php index f2868d67c4d..0acd54fe0ed 100644 --- a/vendor/rector/rector-laravel/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Class_/AddMockConsoleOutputFalseToConsoleTestsRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Illuminate\\Foundation\\Testing\\TestCase'))) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/Class_/AnonymousMigrationsRector.php b/vendor/rector/rector-laravel/src/Rector/Class_/AnonymousMigrationsRector.php index 21a0d282681..fe5718073f5 100644 --- a/vendor/rector/rector-laravel/src/Rector/Class_/AnonymousMigrationsRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Class_/AnonymousMigrationsRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Illuminate\\Database\\Migrations\\Migration'))) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/Class_/PropertyDeferToDeferrableProviderToRector.php b/vendor/rector/rector-laravel/src/Rector/Class_/PropertyDeferToDeferrableProviderToRector.php index 1001a5a35d1..b306ccccb32 100644 --- a/vendor/rector/rector-laravel/src/Rector/Class_/PropertyDeferToDeferrableProviderToRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Class_/PropertyDeferToDeferrableProviderToRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Illuminate\\Support\\ServiceProvider'))) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/Class_/UnifyModelDatesWithCastsRector.php b/vendor/rector/rector-laravel/src/Rector/Class_/UnifyModelDatesWithCastsRector.php index af1097e56b4..cc8ad635fa5 100644 --- a/vendor/rector/rector-laravel/src/Rector/Class_/UnifyModelDatesWithCastsRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Class_/UnifyModelDatesWithCastsRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Illuminate\\Database\\Eloquent\\Model'))) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/FuncCall/FactoryFuncCallToStaticCallRector.php b/vendor/rector/rector-laravel/src/Rector/FuncCall/FactoryFuncCallToStaticCallRector.php index 159cc3b51bf..e43fbc68a11 100644 --- a/vendor/rector/rector-laravel/src/Rector/FuncCall/FactoryFuncCallToStaticCallRector.php +++ b/vendor/rector/rector-laravel/src/Rector/FuncCall/FactoryFuncCallToStaticCallRector.php @@ -41,9 +41,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param Node\Expr\FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, self::FACTORY)) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/FuncCall/HelperFuncCallToFacadeClassRector.php b/vendor/rector/rector-laravel/src/Rector/FuncCall/HelperFuncCallToFacadeClassRector.php index 1266b71833c..5a499817bbf 100644 --- a/vendor/rector/rector-laravel/src/Rector/FuncCall/HelperFuncCallToFacadeClassRector.php +++ b/vendor/rector/rector-laravel/src/Rector/FuncCall/HelperFuncCallToFacadeClassRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'app')) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php b/vendor/rector/rector-laravel/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php index d431965660c..ad870e6c6ec 100644 --- a/vendor/rector/rector-laravel/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php +++ b/vendor/rector/rector-laravel/src/Rector/MethodCall/ChangeQueryWhereDateValueWithCarbonRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $argValue = $this->matchWhereDateThirdArgValue($node); if (!$argValue instanceof \PhpParser\Node\Expr) { diff --git a/vendor/rector/rector-laravel/src/Rector/MethodCall/FactoryApplyingStatesRector.php b/vendor/rector/rector-laravel/src/Rector/MethodCall/FactoryApplyingStatesRector.php index 3294d9ccb84..ebc80c92dc1 100644 --- a/vendor/rector/rector-laravel/src/Rector/MethodCall/FactoryApplyingStatesRector.php +++ b/vendor/rector/rector-laravel/src/Rector/MethodCall/FactoryApplyingStatesRector.php @@ -41,9 +41,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node->name, ['state', 'states'])) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/MethodCall/RemoveAllOnDispatchingMethodsWithJobChainingRector.php b/vendor/rector/rector-laravel/src/Rector/MethodCall/RemoveAllOnDispatchingMethodsWithJobChainingRector.php index 9cf177b6f1d..5b46f57cdae 100644 --- a/vendor/rector/rector-laravel/src/Rector/MethodCall/RemoveAllOnDispatchingMethodsWithJobChainingRector.php +++ b/vendor/rector/rector-laravel/src/Rector/MethodCall/RemoveAllOnDispatchingMethodsWithJobChainingRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node->name, \array_keys(self::SWAPPED_METHODS))) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/Namespace_/FactoryDefinitionRector.php b/vendor/rector/rector-laravel/src/Rector/Namespace_/FactoryDefinitionRector.php index 76ee4568473..309aa3e6f95 100644 --- a/vendor/rector/rector-laravel/src/Rector/Namespace_/FactoryDefinitionRector.php +++ b/vendor/rector/rector-laravel/src/Rector/Namespace_/FactoryDefinitionRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Namespace_::class, \Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class]; } /** - * @param Namespace_|FileWithoutNamespace $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $factories = []; foreach ($node->stmts as $key => $stmt) { diff --git a/vendor/rector/rector-laravel/src/Rector/New_/AddGuardToLoginEventRector.php b/vendor/rector/rector-laravel/src/Rector/New_/AddGuardToLoginEventRector.php index 09b4dee6158..f5f03f7ecda 100644 --- a/vendor/rector/rector-laravel/src/Rector/New_/AddGuardToLoginEventRector.php +++ b/vendor/rector/rector-laravel/src/Rector/New_/AddGuardToLoginEventRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->class, 'Illuminate\\Auth\\Events\\Login')) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php b/vendor/rector/rector-laravel/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php index 595b6ea2675..6d791fdad46 100644 --- a/vendor/rector/rector-laravel/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php +++ b/vendor/rector/rector-laravel/src/Rector/PropertyFetch/OptionalToNullsafeOperatorRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\PropertyFetch::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\FuncCall) { return null; @@ -121,7 +121,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $excludeMethods = $configuration[self::EXCLUDE_METHODS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($excludeMethods); diff --git a/vendor/rector/rector-laravel/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php b/vendor/rector/rector-laravel/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php index 2c828dbbdbe..33b995b98ef 100644 --- a/vendor/rector/rector-laravel/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php +++ b/vendor/rector/rector-laravel/src/Rector/StaticCall/MinutesToSecondsInCacheRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param StaticCall|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach ($this->typeToTimeMethodsAndPositions as $typeToTimeMethodAndPosition) { if (!$this->isObjectType($node instanceof \PhpParser\Node\Expr\MethodCall ? $node->var : $node->class, $typeToTimeMethodAndPosition->getObjectType())) { diff --git a/vendor/rector/rector-laravel/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php b/vendor/rector/rector-laravel/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php index bd7689f0d93..832a397582b 100644 --- a/vendor/rector/rector-laravel/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php +++ b/vendor/rector/rector-laravel/src/Rector/StaticCall/Redirect301ToPermanentRedirectRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isObjectTypes($node->class, $this->routerObjectTypes)) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php b/vendor/rector/rector-laravel/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php index faf2f2db3cf..3a2d8db0bbe 100644 --- a/vendor/rector/rector-laravel/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php +++ b/vendor/rector/rector-laravel/src/Rector/StaticCall/RequestStaticValidateToInjectRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\FuncCall::class]; } /** - * @param StaticCall|FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-laravel/src/Rector/StaticCall/RouteActionCallableRector.php b/vendor/rector/rector-laravel/src/Rector/StaticCall/RouteActionCallableRector.php index cecc910303d..92af8478fcf 100644 --- a/vendor/rector/rector-laravel/src/Rector/StaticCall/RouteActionCallableRector.php +++ b/vendor/rector/rector-laravel/src/Rector/StaticCall/RouteActionCallableRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param Node\Expr\MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->routerRegisterNodeAnalyzer->isRegisterMethodStaticCall($node)) { return null; @@ -112,7 +112,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $routes = $configuration[self::ROUTES] ?? []; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($routes); diff --git a/vendor/rector/rector-nette/src/Contract/Rector/LatteRectorInterface.php b/vendor/rector/rector-nette/src/Contract/Rector/LatteRectorInterface.php index 0e4280264ac..555ef3c9561 100644 --- a/vendor/rector/rector-nette/src/Contract/Rector/LatteRectorInterface.php +++ b/vendor/rector/rector-nette/src/Contract/Rector/LatteRectorInterface.php @@ -6,5 +6,8 @@ namespace Rector\Nette\Contract\Rector; use Rector\Core\Contract\Rector\RectorInterface; interface LatteRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface { - public function changeContent(string $content) : string; + /** + * @param string $content + */ + public function changeContent($content) : string; } diff --git a/vendor/rector/rector-nette/src/Contract/Rector/NeonRectorInterface.php b/vendor/rector/rector-nette/src/Contract/Rector/NeonRectorInterface.php index 5d6d4a54215..15a62c7d290 100644 --- a/vendor/rector/rector-nette/src/Contract/Rector/NeonRectorInterface.php +++ b/vendor/rector/rector-nette/src/Contract/Rector/NeonRectorInterface.php @@ -15,8 +15,8 @@ interface NeonRectorInterface extends \Rector\Core\Contract\Rector\RectorInterfa */ public function getNodeType() : string; /** - * @param TNode $node + * @param \Nette\Neon\Node $node * @return \Nette\Neon\Node|null */ - public function enterNode(\RectorPrefix20211210\Nette\Neon\Node $node); + public function enterNode($node); } diff --git a/vendor/rector/rector-nette/src/Kdyby/Rector/ClassMethod/ChangeNetteEventNamesInGetSubscribedEventsRector.php b/vendor/rector/rector-nette/src/Kdyby/Rector/ClassMethod/ChangeNetteEventNamesInGetSubscribedEventsRector.php index 8f5b1d25398..776199625d3 100644 --- a/vendor/rector/rector-nette/src/Kdyby/Rector/ClassMethod/ChangeNetteEventNamesInGetSubscribedEventsRector.php +++ b/vendor/rector/rector-nette/src/Kdyby/Rector/ClassMethod/ChangeNetteEventNamesInGetSubscribedEventsRector.php @@ -108,9 +108,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->getSubscribedEventsClassMethodAnalyzer->detect($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/ReplaceEventManagerWithEventSubscriberRector.php b/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/ReplaceEventManagerWithEventSubscriberRector.php index f3340d23744..db152e43412 100644 --- a/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/ReplaceEventManagerWithEventSubscriberRector.php +++ b/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/ReplaceEventManagerWithEventSubscriberRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/WrapTransParameterNameRector.php b/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/WrapTransParameterNameRector.php index a84a6d75786..393c58657b4 100644 --- a/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/WrapTransParameterNameRector.php +++ b/vendor/rector/rector-nette/src/Kdyby/Rector/MethodCall/WrapTransParameterNameRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\Translation\\TranslatorInterface'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php b/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php index ba177e2ada3..b73432e5206 100644 --- a/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php +++ b/vendor/rector/rector-nette/src/Rector/ArrayDimFetch/AnnotateMagicalControlArrayAccessRector.php @@ -108,9 +108,9 @@ CODE_SAMPLE )]); } /** - * @param ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessGetControlToGetComponentMethodCallRector.php b/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessGetControlToGetComponentMethodCallRector.php index 6ab4cb7df5d..32f00fbc265 100644 --- a/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessGetControlToGetComponentMethodCallRector.php +++ b/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessGetControlToGetComponentMethodCallRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFetchOfControlFromPresenterDimFetch($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessSetControlToAddComponentMethodCallRector.php b/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessSetControlToAddComponentMethodCallRector.php index 749e0d84c28..af1691a86ad 100644 --- a/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessSetControlToAddComponentMethodCallRector.php +++ b/vendor/rector/rector-nette/src/Rector/Assign/ArrayAccessSetControlToAddComponentMethodCallRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isAssignOfControlToPresenterDimFetch($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Assign/MakeGetComponentAssignAnnotatedRector.php b/vendor/rector/rector-nette/src/Rector/Assign/MakeGetComponentAssignAnnotatedRector.php index a76402e28c5..b1b660b7e23 100644 --- a/vendor/rector/rector-nette/src/Rector/Assign/MakeGetComponentAssignAnnotatedRector.php +++ b/vendor/rector/rector-nette/src/Rector/Assign/MakeGetComponentAssignAnnotatedRector.php @@ -96,9 +96,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isGetComponentMethodCallOrArrayDimFetchOnControl($node->expr)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/ClassMethod/MergeTemplateSetFileToTemplateRenderRector.php b/vendor/rector/rector-nette/src/Rector/ClassMethod/MergeTemplateSetFileToTemplateRenderRector.php index 72471e23cae..f68593d32dd 100644 --- a/vendor/rector/rector-nette/src/Rector/ClassMethod/MergeTemplateSetFileToTemplateRenderRector.php +++ b/vendor/rector/rector-nette/src/Rector/ClassMethod/MergeTemplateSetFileToTemplateRenderRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->netteClassAnalyzer->isInComponent($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/ClassMethod/RemoveParentAndNameFromComponentConstructorRector.php b/vendor/rector/rector-nette/src/Rector/ClassMethod/RemoveParentAndNameFromComponentConstructorRector.php index cb3d625daa4..565175c177b 100644 --- a/vendor/rector/rector-nette/src/Rector/ClassMethod/RemoveParentAndNameFromComponentConstructorRector.php +++ b/vendor/rector/rector-nette/src/Rector/ClassMethod/RemoveParentAndNameFromComponentConstructorRector.php @@ -97,9 +97,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\New_::class]; } /** - * @param ClassMethod|StaticCall|New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\ClassMethod) { return $this->refactorClassMethod($node); diff --git a/vendor/rector/rector-nette/src/Rector/ClassMethod/TemplateMagicAssignToExplicitVariableArrayRector.php b/vendor/rector/rector-nette/src/Rector/ClassMethod/TemplateMagicAssignToExplicitVariableArrayRector.php index 75309c2a07d..e592c20abc2 100644 --- a/vendor/rector/rector-nette/src/Rector/ClassMethod/TemplateMagicAssignToExplicitVariableArrayRector.php +++ b/vendor/rector/rector-nette/src/Rector/ClassMethod/TemplateMagicAssignToExplicitVariableArrayRector.php @@ -100,9 +100,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/ClassMethod/TranslateClassMethodToVariadicsRector.php b/vendor/rector/rector-nette/src/Rector/ClassMethod/TranslateClassMethodToVariadicsRector.php index 79ae43c01bd..5ce5fe62d82 100644 --- a/vendor/rector/rector-nette/src/Rector/ClassMethod/TranslateClassMethodToVariadicsRector.php +++ b/vendor/rector/rector-nette/src/Rector/ClassMethod/TranslateClassMethodToVariadicsRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('Nette\\Localization\\ITranslator'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Class_/FormDataRector.php b/vendor/rector/rector-nette/src/Rector/Class_/FormDataRector.php index e0d659f1a04..cc0a7c8f1b5 100644 --- a/vendor/rector/rector-nette/src/Rector/Class_/FormDataRector.php +++ b/vendor/rector/rector-nette/src/Rector/Class_/FormDataRector.php @@ -111,7 +111,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { if (isset($configuration[self::FORM_DATA_CLASS_PARENT])) { $formDataClassParent = $configuration[self::FORM_DATA_CLASS_PARENT]; @@ -126,9 +126,9 @@ CODE_SAMPLE } } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->name === null) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Class_/LatteVarTypesBasedOnPresenterTemplateParametersRector.php b/vendor/rector/rector-nette/src/Rector/Class_/LatteVarTypesBasedOnPresenterTemplateParametersRector.php index 86f4579d54b..83fc32a05a6 100644 --- a/vendor/rector/rector-nette/src/Rector/Class_/LatteVarTypesBasedOnPresenterTemplateParametersRector.php +++ b/vendor/rector/rector-nette/src/Rector/Class_/LatteVarTypesBasedOnPresenterTemplateParametersRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if (!$this->nodeTypeResolver->isObjectType($node, new \PHPStan\Type\ObjectType('Nette\\Application\\UI\\Presenter'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Class_/MoveFinalGetUserToCheckRequirementsClassMethodRector.php b/vendor/rector/rector-nette/src/Rector/Class_/MoveFinalGetUserToCheckRequirementsClassMethodRector.php index cc86d0c0409..2d1b5d42cd3 100644 --- a/vendor/rector/rector-nette/src/Rector/Class_/MoveFinalGetUserToCheckRequirementsClassMethodRector.php +++ b/vendor/rector/rector-nette/src/Rector/Class_/MoveFinalGetUserToCheckRequirementsClassMethodRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Nette\\Application\\UI\\Presenter'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Class_/MoveInjectToExistingConstructorRector.php b/vendor/rector/rector-nette/src/Rector/Class_/MoveInjectToExistingConstructorRector.php index da24f3f9638..67252cecd5d 100644 --- a/vendor/rector/rector-nette/src/Rector/Class_/MoveInjectToExistingConstructorRector.php +++ b/vendor/rector/rector-nette/src/Rector/Class_/MoveInjectToExistingConstructorRector.php @@ -97,9 +97,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $injectProperties = $this->getInjectProperties($node); if ($injectProperties === []) { diff --git a/vendor/rector/rector-nette/src/Rector/Class_/TemplateTypeBasedOnPresenterTemplateParametersRector.php b/vendor/rector/rector-nette/src/Rector/Class_/TemplateTypeBasedOnPresenterTemplateParametersRector.php index 347b10efe6f..1f37892971e 100644 --- a/vendor/rector/rector-nette/src/Rector/Class_/TemplateTypeBasedOnPresenterTemplateParametersRector.php +++ b/vendor/rector/rector-nette/src/Rector/Class_/TemplateTypeBasedOnPresenterTemplateParametersRector.php @@ -105,7 +105,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { if (isset($configuration[self::TEMPLATE_CLASS_PARENT])) { $templateClassParent = $configuration[self::TEMPLATE_CLASS_PARENT]; @@ -119,9 +119,9 @@ CODE_SAMPLE } } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if (!$this->nodeTypeResolver->isObjectType($node, new \PHPStan\Type\ObjectType('Nette\\Application\\UI\\Presenter'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/FuncCall/FilePutContentsToFileSystemWriteRector.php b/vendor/rector/rector-nette/src/Rector/FuncCall/FilePutContentsToFileSystemWriteRector.php index c4d11ef38f0..03e4fd6f778 100644 --- a/vendor/rector/rector-nette/src/Rector/FuncCall/FilePutContentsToFileSystemWriteRector.php +++ b/vendor/rector/rector-nette/src/Rector/FuncCall/FilePutContentsToFileSystemWriteRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'file_put_contents')) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/FuncCall/JsonDecodeEncodeToNetteUtilsJsonDecodeEncodeRector.php b/vendor/rector/rector-nette/src/Rector/FuncCall/JsonDecodeEncodeToNetteUtilsJsonDecodeEncodeRector.php index f0304f53255..14438468895 100644 --- a/vendor/rector/rector-nette/src/Rector/FuncCall/JsonDecodeEncodeToNetteUtilsJsonDecodeEncodeRector.php +++ b/vendor/rector/rector-nette/src/Rector/FuncCall/JsonDecodeEncodeToNetteUtilsJsonDecodeEncodeRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->isName($node, 'json_encode')) { return $this->refactorJsonEncode($node); diff --git a/vendor/rector/rector-nette/src/Rector/FuncCall/PregFunctionToNetteUtilsStringsRector.php b/vendor/rector/rector-nette/src/Rector/FuncCall/PregFunctionToNetteUtilsStringsRector.php index 2e2082b378c..7df5b690341 100644 --- a/vendor/rector/rector-nette/src/Rector/FuncCall/PregFunctionToNetteUtilsStringsRector.php +++ b/vendor/rector/rector-nette/src/Rector/FuncCall/PregFunctionToNetteUtilsStringsRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE )]); } /** - * @param FuncCall|Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return $this->refactorIdentical($node); @@ -81,7 +81,10 @@ CODE_SAMPLE { return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BinaryOp\Identical::class]; } - public function refactorIdentical(\PhpParser\Node\Expr\BinaryOp\Identical $identical) : ?\PhpParser\Node\Expr\Cast\Bool_ + /** + * @param \PhpParser\Node\Expr\BinaryOp\Identical $identical + */ + public function refactorIdentical($identical) : ?\PhpParser\Node\Expr\Cast\Bool_ { $parent = $identical->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node) { @@ -103,8 +106,9 @@ CODE_SAMPLE } /** * @return FuncCall|StaticCall|Assign|null + * @param \PhpParser\Node\Expr\FuncCall $funcCall */ - public function refactorFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr + public function refactorFuncCall($funcCall) : ?\PhpParser\Node\Expr { $methodName = $this->nodeNameResolver->matchNameFromMap($funcCall, self::FUNCTION_NAME_TO_METHOD_NAME); if ($methodName === null) { diff --git a/vendor/rector/rector-nette/src/Rector/FuncCall/PregMatchFunctionToNetteUtilsStringsRector.php b/vendor/rector/rector-nette/src/Rector/FuncCall/PregMatchFunctionToNetteUtilsStringsRector.php index 9d14e76af11..ac39af49c26 100644 --- a/vendor/rector/rector-nette/src/Rector/FuncCall/PregMatchFunctionToNetteUtilsStringsRector.php +++ b/vendor/rector/rector-nette/src/Rector/FuncCall/PregMatchFunctionToNetteUtilsStringsRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE )]); } /** - * @param FuncCall|Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\BinaryOp\Identical) { return $this->refactorIdentical($node); @@ -80,7 +80,10 @@ CODE_SAMPLE { return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\BinaryOp\Identical::class]; } - public function refactorIdentical(\PhpParser\Node\Expr\BinaryOp\Identical $identical) : ?\PhpParser\Node\Expr\Cast\Bool_ + /** + * @param \PhpParser\Node\Expr\BinaryOp\Identical $identical + */ + public function refactorIdentical($identical) : ?\PhpParser\Node\Expr\Cast\Bool_ { $parent = $identical->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE); if (!$parent instanceof \PhpParser\Node) { @@ -102,8 +105,9 @@ CODE_SAMPLE } /** * @return FuncCall|StaticCall|Assign|null + * @param \PhpParser\Node\Expr\FuncCall $funcCall */ - public function refactorFuncCall(\PhpParser\Node\Expr\FuncCall $funcCall) : ?\PhpParser\Node\Expr + public function refactorFuncCall($funcCall) : ?\PhpParser\Node\Expr { $methodName = $this->nodeNameResolver->matchNameFromMap($funcCall, self::FUNCTION_NAME_TO_METHOD_NAME); if ($methodName === null) { diff --git a/vendor/rector/rector-nette/src/Rector/FuncCall/SubstrStrlenFunctionToNetteUtilsStringsRector.php b/vendor/rector/rector-nette/src/Rector/FuncCall/SubstrStrlenFunctionToNetteUtilsStringsRector.php index 22ff4c65aff..67d633d1f70 100644 --- a/vendor/rector/rector-nette/src/Rector/FuncCall/SubstrStrlenFunctionToNetteUtilsStringsRector.php +++ b/vendor/rector/rector-nette/src/Rector/FuncCall/SubstrStrlenFunctionToNetteUtilsStringsRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach (self::FUNCTION_TO_STATIC_METHOD as $function => $staticMethod) { if (!$this->isName($node, $function)) { diff --git a/vendor/rector/rector-nette/src/Rector/Identical/EndsWithFunctionToNetteUtilsStringsRector.php b/vendor/rector/rector-nette/src/Rector/Identical/EndsWithFunctionToNetteUtilsStringsRector.php index 0bf4487c035..4c58507ff21 100644 --- a/vendor/rector/rector-nette/src/Rector/Identical/EndsWithFunctionToNetteUtilsStringsRector.php +++ b/vendor/rector/rector-nette/src/Rector/Identical/EndsWithFunctionToNetteUtilsStringsRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE )]); } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $contentExprAndNeedleExpr = $this->strlenEndsWithResolver->resolveBinaryOpForFunction($node); if (!$contentExprAndNeedleExpr instanceof \Rector\Nette\ValueObject\ContentExprAndNeedleExpr) { diff --git a/vendor/rector/rector-nette/src/Rector/Identical/StartsWithFunctionToNetteUtilsStringsRector.php b/vendor/rector/rector-nette/src/Rector/Identical/StartsWithFunctionToNetteUtilsStringsRector.php index fbec1477cc0..5751de51479 100644 --- a/vendor/rector/rector-nette/src/Rector/Identical/StartsWithFunctionToNetteUtilsStringsRector.php +++ b/vendor/rector/rector-nette/src/Rector/Identical/StartsWithFunctionToNetteUtilsStringsRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE )]); } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $contentExprAndNeedleExpr = $this->strlenStartsWithResolver->resolveBinaryOpForFunction($node, 'substr'); if (!$contentExprAndNeedleExpr instanceof \Rector\Nette\ValueObject\ContentExprAndNeedleExpr) { diff --git a/vendor/rector/rector-nette/src/Rector/Identical/SubstrMinusToStringEndsWithRector.php b/vendor/rector/rector-nette/src/Rector/Identical/SubstrMinusToStringEndsWithRector.php index e4818094372..e76349da751 100644 --- a/vendor/rector/rector-nette/src/Rector/Identical/SubstrMinusToStringEndsWithRector.php +++ b/vendor/rector/rector-nette/src/Rector/Identical/SubstrMinusToStringEndsWithRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\Identical::class, \PhpParser\Node\Expr\BinaryOp\NotIdentical::class]; } /** - * @param Identical|NotIdentical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $funcCallAndExpr = $this->binaryOpAnalyzer->matchFuncCallAndOtherExpr($node, self::SUBSTR); if (!$funcCallAndExpr instanceof \Rector\Nette\ValueObject\FuncCallAndExpr) { diff --git a/vendor/rector/rector-nette/src/Rector/LNumber/ReplaceTimeNumberWithDateTimeConstantRector.php b/vendor/rector/rector-nette/src/Rector/LNumber/ReplaceTimeNumberWithDateTimeConstantRector.php index 6fe81eb74f7..d4f6f5d7fe9 100644 --- a/vendor/rector/rector-nette/src/Rector/LNumber/ReplaceTimeNumberWithDateTimeConstantRector.php +++ b/vendor/rector/rector-nette/src/Rector/LNumber/ReplaceTimeNumberWithDateTimeConstantRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\LNumber::class]; } /** - * @param LNumber $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $number = $node->value; $constantName = self::NUMBER_TO_CONSTANT_NAME[$number] ?? null; diff --git a/vendor/rector/rector-nette/src/Rector/Latte/RenameMethodLatteRector.php b/vendor/rector/rector-nette/src/Rector/Latte/RenameMethodLatteRector.php index f94d38c6536..7f807b32430 100644 --- a/vendor/rector/rector-nette/src/Rector/Latte/RenameMethodLatteRector.php +++ b/vendor/rector/rector-nette/src/Rector/Latte/RenameMethodLatteRector.php @@ -46,7 +46,10 @@ CODE_SAMPLE CODE_SAMPLE )]); } - public function changeContent(string $content) : string + /** + * @param string $content + */ + public function changeContent($content) : string { $typesToVariables = $this->findTypesForVariables($content); foreach ($this->methodCallRenameCollector->getMethodCallRenames() as $methodCallRename) { diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/AddNextrasDatePickerToDateControlRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/AddNextrasDatePickerToDateControlRector.php index b8e6d91d6b0..1f4abc435ae 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/AddNextrasDatePickerToDateControlRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/AddNextrasDatePickerToDateControlRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // 1. chain call if ($node->var instanceof \PhpParser\Node\Expr\MethodCall) { diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/BuilderExpandToHelperExpandRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/BuilderExpandToHelperExpandRector.php index 79a637a40c6..da07cffac3f 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/BuilderExpandToHelperExpandRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/BuilderExpandToHelperExpandRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Nette\\DI\\ContainerBuilder'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/ContextGetByTypeToConstructorInjectionRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/ContextGetByTypeToConstructorInjectionRector.php index b4d896963fe..3c72dc98879 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/ContextGetByTypeToConstructorInjectionRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/ContextGetByTypeToConstructorInjectionRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector.php index f914b5b6925..a8971fea5cc 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector.php @@ -35,9 +35,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Nette\\Forms\\Form'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/MagicHtmlCallToAppendAttributeRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/MagicHtmlCallToAppendAttributeRector.php index 10230e3ddd0..020b9053a22 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/MagicHtmlCallToAppendAttributeRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/MagicHtmlCallToAppendAttributeRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Nette\\Utils\\Html'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/MergeDefaultsInGetConfigCompilerExtensionRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/MergeDefaultsInGetConfigCompilerExtensionRector.php index 701defff090..5b767612692 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/MergeDefaultsInGetConfigCompilerExtensionRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/MergeDefaultsInGetConfigCompilerExtensionRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Nette\\DI\\CompilerExtension'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/RequestGetCookieDefaultArgumentToCoalesceRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/RequestGetCookieDefaultArgumentToCoalesceRector.php index 2b2517d62eb..87e7771d8aa 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/RequestGetCookieDefaultArgumentToCoalesceRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/RequestGetCookieDefaultArgumentToCoalesceRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Nette\\Http\\Request'))) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/MethodCall/SetClassWithArgumentToSetFactoryRector.php b/vendor/rector/rector-nette/src/Rector/MethodCall/SetClassWithArgumentToSetFactoryRector.php index 4a65c27b6c8..59d3686a952 100644 --- a/vendor/rector/rector-nette/src/Rector/MethodCall/SetClassWithArgumentToSetFactoryRector.php +++ b/vendor/rector/rector-nette/src/Rector/MethodCall/SetClassWithArgumentToSetFactoryRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'setClass')) { return null; diff --git a/vendor/rector/rector-nette/src/Rector/Neon/RenameMethodNeonRector.php b/vendor/rector/rector-nette/src/Rector/Neon/RenameMethodNeonRector.php index 2105edd7cc6..9de973cc8bc 100644 --- a/vendor/rector/rector-nette/src/Rector/Neon/RenameMethodNeonRector.php +++ b/vendor/rector/rector-nette/src/Rector/Neon/RenameMethodNeonRector.php @@ -47,10 +47,10 @@ CODE_SAMPLE return \Rector\Nette\NeonParser\Node\Service_\SetupMethodCall::class; } /** - * @param SetupMethodCall $node + * @param \Nette\Neon\Node $node * @return \Nette\Neon\Node|null */ - public function enterNode(\RectorPrefix20211210\Nette\Neon\Node $node) + public function enterNode($node) { foreach ($this->methodCallRenameCollector->getMethodCallRenames() as $methodCallRename) { if (!\is_a($node->className, $methodCallRename->getClass(), \true)) { diff --git a/vendor/rector/rector-nette/src/Rector/NotIdentical/StrposToStringsContainsRector.php b/vendor/rector/rector-nette/src/Rector/NotIdentical/StrposToStringsContainsRector.php index f27800405a5..363d14b3bfb 100644 --- a/vendor/rector/rector-nette/src/Rector/NotIdentical/StrposToStringsContainsRector.php +++ b/vendor/rector/rector-nette/src/Rector/NotIdentical/StrposToStringsContainsRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp\NotIdentical::class, \PhpParser\Node\Expr\BinaryOp\Identical::class]; } /** - * @param NotIdentical|Identical $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $funcCall = $this->matchStrposInComparisonToFalse($node); if (!$funcCall instanceof \PhpParser\Node\Expr\FuncCall) { diff --git a/vendor/rector/rector-nette/src/Rector/Property/NetteInjectToConstructorInjectionRector.php b/vendor/rector/rector-nette/src/Rector/Property/NetteInjectToConstructorInjectionRector.php index e8cf3d9626b..05b081ee35f 100644 --- a/vendor/rector/rector-nette/src/Rector/Property/NetteInjectToConstructorInjectionRector.php +++ b/vendor/rector/rector-nette/src/Rector/Property/NetteInjectToConstructorInjectionRector.php @@ -85,9 +85,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalGetConditionRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalGetConditionRector.php index dbcf7d075c3..321054b3afd 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalGetConditionRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalGetConditionRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Style_Conditional'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalReturnedCellRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalReturnedCellRector.php index 109776b9d92..cd522a860f1 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalReturnedCellRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalReturnedCellRector.php @@ -61,9 +61,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Worksheet'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalSetConditionRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalSetConditionRector.php index a881a426c8c..1928f945bcf 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalSetConditionRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeConditionalSetConditionRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Style_Conditional'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeDuplicateStyleArrayToApplyFromArrayRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeDuplicateStyleArrayToApplyFromArrayRector.php index 50084bbef7d..f3ddae4715c 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeDuplicateStyleArrayToApplyFromArrayRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/ChangeDuplicateStyleArrayToApplyFromArrayRector.php @@ -49,9 +49,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Worksheet'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/GetDefaultStyleToGetParentRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/GetDefaultStyleToGetParentRector.php index 166212c8027..28797263619 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/GetDefaultStyleToGetParentRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/GetDefaultStyleToGetParentRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Worksheet'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/IncreaseColumnIndexRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/IncreaseColumnIndexRector.php index 8414389e11a..e813e043e19 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/IncreaseColumnIndexRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/IncreaseColumnIndexRector.php @@ -66,9 +66,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isObjectTypes($node->var, $this->worksheetObjectTypes)) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/RemoveSetTempDirOnExcelWriterRector.php b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/RemoveSetTempDirOnExcelWriterRector.php index 6266b7c94e0..97f15988715 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/MethodCall/RemoveSetTempDirOnExcelWriterRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/MethodCall/RemoveSetTempDirOnExcelWriterRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('PHPExcel_Writer_Excel5'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/AddRemovedDefaultValuesRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/AddRemovedDefaultValuesRector.php index ef4978c7fac..95a63bb7dca 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/AddRemovedDefaultValuesRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/AddRemovedDefaultValuesRector.php @@ -51,10 +51,10 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param StaticCall|MethodCall $node + * @param \PhpParser\Node $node * @return \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\StaticCall */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { foreach (\Rector\PHPOffice\ValueObject\PHPExcelMethodDefaultValues::METHOD_NAMES_BY_TYPE_WITH_VALUE as $type => $defaultValuesByMethodName) { if (!$this->isCallerObjectType($node, new \PHPStan\Type\ObjectType($type))) { diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/CellStaticToCoordinateRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/CellStaticToCoordinateRector.php index f8e02946998..72e379b9d44 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/CellStaticToCoordinateRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/CellStaticToCoordinateRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->class, new \PHPStan\Type\ObjectType('PHPExcel_Cell'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeChartRendererRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeChartRendererRector.php index fb9ae1ec9a8..0940d0ff9c2 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeChartRendererRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeChartRendererRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callerType = $this->nodeTypeResolver->getType($node->class); if (!$callerType->isSuperTypeOf(new \PHPStan\Type\ObjectType('PHPExcel_Settings'))->yes()) { diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeDataTypeForValueRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeDataTypeForValueRector.php index e3dbd2da592..c6c1e0887d8 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeDataTypeForValueRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeDataTypeForValueRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callerType = $this->nodeTypeResolver->getType($node->class); if (!$callerType->isSuperTypeOf(new \PHPStan\Type\ObjectType('PHPExcel_Cell_DataType'))->yes()) { diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeIOFactoryArgumentRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeIOFactoryArgumentRector.php index a4794c5b371..7936c33e93b 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeIOFactoryArgumentRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeIOFactoryArgumentRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->class, new \PHPStan\Type\ObjectType('PHPExcel_IOFactory'))) { return null; diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangePdfWriterRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangePdfWriterRector.php index a4c43b0bd17..93451c58e54 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangePdfWriterRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangePdfWriterRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callerType = $this->nodeTypeResolver->getType($node->class); if ($this->isSettingsPdfRendererStaticCall($callerType, $node)) { diff --git a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeSearchLocationToRegisterReaderRector.php b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeSearchLocationToRegisterReaderRector.php index 5c01dd7bfe0..f5968962fe7 100644 --- a/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeSearchLocationToRegisterReaderRector.php +++ b/vendor/rector/rector-phpoffice/src/Rector/StaticCall/ChangeSearchLocationToRegisterReaderRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $callerType = $this->nodeTypeResolver->getType($node->class); if (!$callerType->isSuperTypeOf(new \PHPStan\Type\ObjectType('PHPExcel_IOFactory'))->yes()) { diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector.php index fd153b89e0b..ce126dd3e01 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/AddDoesNotPerformAssertionToNonAssertingTestRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->classMethodNestingLevel = 0; if ($this->shouldSkipClassMethod($node)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/ExceptionAnnotationRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/ExceptionAnnotationRector.php index 572d9740fe2..05a717e71ca 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/ExceptionAnnotationRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/ExceptionAnnotationRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/MigrateAtToConsecutiveExpectationsRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/MigrateAtToConsecutiveExpectationsRector.php index 9da46f83df1..3173e628642 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/MigrateAtToConsecutiveExpectationsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/MigrateAtToConsecutiveExpectationsRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $stmts = $node->stmts; if ($stmts === null) { diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/RemoveEmptyTestMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/RemoveEmptyTestMethodRector.php index 6bdce4c63d6..6015e14cc5c 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/RemoveEmptyTestMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/RemoveEmptyTestMethodRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php index 79e470ff4a2..87fa2339d66 100644 --- a/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/ClassMethod/TryCatchToExpectExceptionRector.php @@ -75,9 +75,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/AddProphecyTraitRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/AddProphecyTraitRector.php index d22c6bd49f3..e0161eeea49 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/AddProphecyTraitRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/AddProphecyTraitRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/AddSeeTestAnnotationRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/AddSeeTestAnnotationRector.php index 58873082eee..92ecc0cacb3 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/AddSeeTestAnnotationRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/AddSeeTestAnnotationRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $className = $this->getName($node); if ($className === null) { diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php index d87c3bcb3e9..80c2fe9d579 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/ArrayArgumentToDataProviderRector.php @@ -113,9 +113,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; @@ -140,7 +140,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $arrayArgumentsToDataProviders = $configuration[self::ARRAY_ARGUMENTS_TO_DATA_PROVIDERS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($arrayArgumentsToDataProviders); diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/ConstructClassMethodToSetUpTestCaseRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/ConstructClassMethodToSetUpTestCaseRector.php index e1453f490ae..2374ea6b87f 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/ConstructClassMethodToSetUpTestCaseRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/ConstructClassMethodToSetUpTestCaseRector.php @@ -81,9 +81,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/RemoveDataProviderTestPrefixRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/RemoveDataProviderTestPrefixRector.php index adbd489d9d2..6ef878780e4 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/RemoveDataProviderTestPrefixRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/RemoveDataProviderTestPrefixRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/Class_/TestListenerToHooksRector.php b/vendor/rector/rector-phpunit/src/Rector/Class_/TestListenerToHooksRector.php index d3c4f2d48c6..275f22978dd 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Class_/TestListenerToHooksRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Class_/TestListenerToHooksRector.php @@ -120,9 +120,9 @@ CODE_SAMPLE /** * Process Node of matched type * - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('PHPUnit\\Framework\\TestListener'))) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php b/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php index e9274503b20..2d2b4f44359 100644 --- a/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/Foreach_/SimplifyForeachInstanceOfRector.php @@ -42,9 +42,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Foreach_::class]; } /** - * @param Foreach_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var MethodCall|StaticCall|null $matchedNode */ $matchedNode = $this->foreachManipulator->matchOnlyStmt($node, function (\PhpParser\Node $node, \PhpParser\Node\Stmt\Foreach_ $foreachNode) : ?Node { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php index 5e056702faf..fa7ab33aa5f 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertCompareToSpecificMethodRector.php @@ -52,9 +52,9 @@ final class AssertCompareToSpecificMethodRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertNotSame', 'assertEquals', 'assertNotEquals'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php index 8d0e3a84118..d4732da9654 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertComparisonToSpecificMethodRector.php @@ -60,9 +60,9 @@ final class AssertComparisonToSpecificMethodRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php index dcff4112bbc..3c3cace0332 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsParameterToSpecificMethodsTypeRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertEquals', 'assertNotEquals'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php index 0546d4ea917..feddae4de3a 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertEqualsToSameRector.php @@ -57,9 +57,9 @@ final class AssertEqualsToSameRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php index 092bbab7afb..b808a41a0f8 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertFalseStrposToContainsRector.php @@ -46,9 +46,9 @@ final class AssertFalseStrposToContainsRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldMethodName = \array_keys(self::RENAME_METHODS_MAP); if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodName)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php index b79b58da42a..dc0a0c95a62 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertInstanceOfComparisonRector.php @@ -48,9 +48,9 @@ final class AssertInstanceOfComparisonRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldMethodNames = \array_keys(self::RENAME_METHODS_MAP); if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodNames)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php index e4d6128b64f..90d03a65b29 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertIssetToSpecificMethodRector.php @@ -55,9 +55,9 @@ final class AssertIssetToSpecificMethodRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, [self::ASSERT_TRUE, self::ASSERT_FALSE])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php index 8b52ed98197..aa0747ff798 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertNotOperatorRector.php @@ -47,9 +47,9 @@ final class AssertNotOperatorRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldMethodNames = \array_keys(self::RENAME_METHODS_MAP); if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodNames)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php index 4dd743a919a..956d0fbffa0 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertPropertyExistsRector.php @@ -53,9 +53,9 @@ final class AssertPropertyExistsRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php index dc7a1fe5786..eae132f24b4 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertRegExpRector.php @@ -57,9 +57,9 @@ final class AssertRegExpRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, [self::ASSERT_SAME, self::ASSERT_EQUALS, self::ASSERT_NOT_SAME, self::ASSERT_NOT_EQUALS])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php index 217e1adece8..b5b63ff5670 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertResourceToClosedResourceRector.php @@ -47,9 +47,9 @@ final class AssertResourceToClosedResourceRector extends \Rector\Core\Rector\Abs return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php index f995913ab7e..9b25f896b92 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameBoolNullToSpecificMethodRector.php @@ -54,9 +54,9 @@ final class AssertSameBoolNullToSpecificMethodRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertNotSame'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php index d9429391abb..0280574c046 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertSameTrueFalseToAssertTrueFalseRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertSame', 'assertEqual', 'assertNotSame', 'assertNotEqual'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php index 9d7b969539b..b756b350836 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseInternalTypeToSpecificMethodRector.php @@ -52,9 +52,9 @@ final class AssertTrueFalseInternalTypeToSpecificMethodRector extends \Rector\Co return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldMethods = \array_keys(self::RENAME_METHODS_MAP); if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethods)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php index a957a19f273..3064efe1ab1 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/AssertTrueFalseToSpecificMethodRector.php @@ -45,9 +45,9 @@ final class AssertTrueFalseToSpecificMethodRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertTrue', 'assertFalse', 'assertNotTrue', 'assertNotFalse'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/CreateMockToCreateStubRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/CreateMockToCreateStubRector.php index 5d8929a4e2e..35d693d51c8 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/CreateMockToCreateStubRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/CreateMockToCreateStubRector.php @@ -89,9 +89,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/DelegateExceptionArgumentsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/DelegateExceptionArgumentsRector.php index a5f2ac81f97..ac2652befdd 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/DelegateExceptionArgumentsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/DelegateExceptionArgumentsRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $oldMethodNames = \array_keys(self::OLD_TO_NEW_METHOD); if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, $oldMethodNames)) { diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php index 0cd065a2506..1f23d61bc28 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ExplicitPhpErrorApiRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['expectException'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/GetMockBuilderGetMockToCreateMockRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/GetMockBuilderGetMockToCreateMockRector.php index 4102d1ab2fa..5ebcff1f81f 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/GetMockBuilderGetMockToCreateMockRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/GetMockBuilderGetMockToCreateMockRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'getMock')) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php index e53eb6dfac2..f7ff3c567f9 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/RemoveExpectAnyFromMockRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetWithDmsPolyfillRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetWithDmsPolyfillRector.php index ac4bbb8df99..774ad9619ed 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetWithDmsPolyfillRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/ReplaceAssertArraySubsetWithDmsPolyfillRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInPHPUnitMethodCallName($node, 'assertArraySubset')) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php index e0d2510bf11..689fa20465f 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertContains', 'assertNotContains'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php index 4e309508f07..59d82ae7937 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertContainsWithoutIdentityRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertContains', 'assertNotContains'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php index d7682f40589..3084e923e8a 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/SpecificAssertInternalTypeRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['assertInternalType', 'assertNotInternalType'])) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php index 52194035aaf..505a3d56d1c 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/UseSpecificWillMethodRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isInTestClass($node)) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/MethodCall/WithConsecutiveArgToArrayRector.php b/vendor/rector/rector-phpunit/src/Rector/MethodCall/WithConsecutiveArgToArrayRector.php index bf8d7ba9f99..8c84b999fa2 100644 --- a/vendor/rector/rector-phpunit/src/Rector/MethodCall/WithConsecutiveArgToArrayRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/MethodCall/WithConsecutiveArgToArrayRector.php @@ -91,9 +91,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'withConsecutive')) { return null; diff --git a/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php b/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php index fef4704b390..1cffeee7345 100644 --- a/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php +++ b/vendor/rector/rector-phpunit/src/Rector/StaticCall/GetMockRector.php @@ -39,9 +39,9 @@ final class GetMockRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['getMock', 'getMockWithoutInvokingTheOriginalConstructor'])) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php b/vendor/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php index e919bd86a63..a1ee95a6491 100644 --- a/vendor/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php +++ b/vendor/rector/rector-symfony/src/Rector/BinaryOp/ResponseStatusCodeRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\BinaryOp::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param BinaryOp|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\MethodCall) { return $this->processMethodCall($node); diff --git a/vendor/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php b/vendor/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php index e294e112baa..25d36fbd55c 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassConstFetch/ConsoleExceptionToErrorEventConstantRector.php @@ -39,9 +39,9 @@ final class ConsoleExceptionToErrorEventConstantRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\ClassConstFetch::class, \PhpParser\Node\Scalar\String_::class]; } /** - * @param ClassConstFetch|String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\ClassConstFetch && ($this->isObjectType($node->class, $this->consoleEventsObjectType) && $this->isName($node->name, 'EXCEPTION'))) { return $this->nodeFactory->createClassConstFetch($this->consoleEventsObjectType->getClassName(), 'ERROR'); diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php index b0c459c5782..608e5e1a7d8 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ActionSuffixRemoverRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->controllerMethodAnalyzer->isAction($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php index 3e092e79806..616cf12f489 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ConsoleExecuteReturnIntRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'execute')) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php index c2162c05034..b8fa470acf6 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/FormTypeGetParentRector.php @@ -82,9 +82,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isClassAndMethodMatch($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php index 54668b3f547..b8cee4a2d02 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/GetRequestRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param ClassMethod|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->controllerAnalyzer->detect($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php index a9e35bde8b4..b514c200de3 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/MergeMethodAnnotationToRouteAnnotationRector.php @@ -74,9 +74,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $classLike = $this->betterNodeFinder->findParentType($node, \PhpParser\Node\Stmt\ClassLike::class); if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php index f3bfb647a18..704367eb57a 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveDefaultGetBlockPrefixRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectMethodNameMatch($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php index fc12cbaaf75..678afa04126 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RemoveServiceFromSensioRouteRector.php @@ -55,9 +55,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Class_::class]; } /** - * @param ClassMethod|Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $doctrineAnnotationTagValueNode = $phpDocInfo->getByAnnotationClass('Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\Route'); diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php index f2f55efc51c..9aece4dd1ba 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/ReplaceSensioRouteAnnotationWithSymfonyRector.php @@ -77,9 +77,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Class_::class]; } /** - * @param ClassMethod|Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); if ($phpDocInfo->hasByAnnotationClass('Symfony\\Component\\Routing\\Annotation\\Route')) { diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php index a56dad07b28..a6ce381ae08 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/RouteCollectionBuilderToRoutingConfiguratorRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'configureRoutes')) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php b/vendor/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php index 2568ea3f57a..7ee957bfa68 100644 --- a/vendor/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ClassMethod/TemplateAnnotationToThisRenderRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class, \PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Class_) { return $this->addAbstractControllerParentClassIfMissing($node); diff --git a/vendor/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php b/vendor/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php index 3cf8c3273bf..a38137cc639 100644 --- a/vendor/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Class_/ChangeFileLoaderInExtensionAndKernelRector.php @@ -91,9 +91,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isKernelOrExtensionClass($node)) { return null; @@ -113,7 +113,10 @@ CODE_SAMPLE }); return $node; } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { $this->from = $configuration[self::FROM]; $this->to = $configuration[self::TO]; diff --git a/vendor/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php b/vendor/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php index dc91d28683f..da438aaf08e 100644 --- a/vendor/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Class_/EventListenerToEventSubscriberRector.php @@ -113,9 +113,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { // anonymous class if ($node->name === null) { diff --git a/vendor/rector/rector-symfony/src/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php b/vendor/rector/rector-symfony/src/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php index 34e2422b2cf..68c99da8446 100644 --- a/vendor/rector/rector-symfony/src/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Class_/LogoutHandlerToLogoutEventSubscriberRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, $this->logoutHandlerObjectType)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php b/vendor/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php index 4a9c8b35cf3..9af3851cb2e 100644 --- a/vendor/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Class_/LogoutSuccessHandlerToLogoutEventSubscriberRector.php @@ -108,9 +108,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, $this->successHandlerObjectType)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php b/vendor/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php index 38fa254d27e..cfaa2926255 100644 --- a/vendor/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Class_/MakeCommandLazyRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('Symfony\\Component\\Console\\Command\\Command'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php b/vendor/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php index 1b7b91c3f3d..747fdc5487e 100644 --- a/vendor/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/ConstFetch/ConstraintUrlOptionRector.php @@ -35,9 +35,9 @@ final class ConstraintUrlOptionRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->valueResolver->isTrue($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php b/vendor/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php index 196fb9525aa..e3f3ecd9eee 100644 --- a/vendor/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php +++ b/vendor/rector/rector-symfony/src/Rector/FuncCall/ReplaceServiceArgumentRector.php @@ -44,9 +44,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\FuncCall::class]; } /** - * @param FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) + public function refactor($node) { if (!$this->isName($node, 'Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\service')) { return null; @@ -67,7 +67,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { \RectorPrefix20211210\Webmozart\Assert\Assert::allIsAOf($configuration, \Rector\Symfony\ValueObject\ReplaceServiceArgument::class); $this->replaceServiceArguments = $configuration; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php index 7a076bbd045..80acc62523e 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/AddFlashRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->controllerAnalyzer->detect($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/CascadeValidationFormBuilderRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/CascadeValidationFormBuilderRector.php index 477900c89ec..25101e015a9 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/CascadeValidationFormBuilderRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/CascadeValidationFormBuilderRector.php @@ -76,9 +76,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php index 15a0ddd491f..156a70285ae 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeCollectionTypeOptionNameFromTypeToEntryTypeRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->formAddMethodCallAnalyzer->isMatching($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php index 1521fd26a7c..9055ccfb279 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ChangeStringCollectionOptionToConstantRector.php @@ -96,9 +96,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->formAddMethodCallAnalyzer->isMatching($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php index a17668189be..62c1b53f55a 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerBuilderCompileEnvArgumentRector.php @@ -38,9 +38,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\DependencyInjection\\ContainerBuilder'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php index 88d7d98ecc3..cbeb48da83f 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ContainerGetToConstructorInjectionRector.php @@ -70,9 +70,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\DependencyInjection\\ContainerInterface'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php index 4b62e082a16..128a334c8a7 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/DefinitionAliasSetPrivateToSetPublicRector.php @@ -69,9 +69,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isObjectTypes($node->var, $this->definitionObjectTypes)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormBuilderSetDataMapperRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormBuilderSetDataMapperRector.php index 9bb662292ac..0de19132671 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormBuilderSetDataMapperRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormBuilderSetDataMapperRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\Form\\FormConfigBuilderInterface'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormIsValidRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormIsValidRector.php index 0a6bbc3f2a1..fca6c9d5eac 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormIsValidRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormIsValidRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkipMethodCall($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormTypeInstanceToClassConstRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormTypeInstanceToClassConstRector.php index 9a08ff8f647..763cdbc0f5f 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/FormTypeInstanceToClassConstRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/FormTypeInstanceToClassConstRector.php @@ -92,9 +92,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->nodeTypeResolver->isObjectTypes($node->var, $this->controllerObjectTypes) && $this->isName($node->name, 'createForm')) { return $this->processNewInstance($node, 0, 2); diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/GetParameterToConstructorInjectionRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/GetParameterToConstructorInjectionRector.php index 9b60990d738..adc7bb2a1ee 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/GetParameterToConstructorInjectionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/GetParameterToConstructorInjectionRector.php @@ -78,9 +78,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $varType = $this->nodeTypeResolver->getType($node->var); if (!$varType instanceof \PHPStan\Type\TypeWithClassName) { diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php index 9c7e7e5027c..b5503b35616 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/GetToConstructorInjectionRector.php @@ -68,9 +68,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->containerAwareAnalyzer->isGetMethodAwareType($node->var)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php index ab1b255fc78..a457e30054e 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/MakeDispatchFirstArgumentEventRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/OptionNameRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/OptionNameRector.php index 157b6cb051a..79aab9de858 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/OptionNameRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/OptionNameRector.php @@ -54,9 +54,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->formAddMethodCallAnalyzer->isMatching($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ProcessBuilderGetProcessRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ProcessBuilderGetProcessRector.php index 9ba2ceffa99..b54010629b0 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ProcessBuilderGetProcessRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ProcessBuilderGetProcessRector.php @@ -36,9 +36,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\Process\\ProcessBuilder'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php index 7a7509f0c38..1a342785741 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ReadOnlyOptionToAttributeRector.php @@ -65,9 +65,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->formAddMethodCallAnalyzer->isMatching($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php index 1d028c77382..33f762eef8f 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/RedirectToRouteRector.php @@ -29,9 +29,9 @@ final class RedirectToRouteRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $scope = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE); if (!$scope instanceof \PHPStan\Analyser\Scope) { diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php index 5f4b3550176..c9bb5a093e0 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ReflectionExtractorEnableMagicCallExtractorRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/SimplifyWebTestCaseAssertionsRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/SimplifyWebTestCaseAssertionsRector.php index 606116f496f..81c76bb7cb5 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/SimplifyWebTestCaseAssertionsRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/SimplifyWebTestCaseAssertionsRector.php @@ -89,9 +89,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isInWebTestCase($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php index 548b2054c3b..13c83e53bb3 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/StringFormTypeToClassRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->formAddMethodCallAnalyzer->isMatching($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php index 036a944c6b6..eec8a3c4676 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftCreateMessageToNewEmailRector.php @@ -37,9 +37,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php index 113adf0c3d6..626966fce6d 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/SwiftSetBodyToHtmlPlainMethodCallRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Swift_Message'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php index 37729afb027..4b719595a52 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/ValidatorBuilderEnableAnnotationMappingRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\Validator\\ValidatorBuilder'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php b/vendor/rector/rector-symfony/src/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php index 37abcb0c711..4ea96fa9489 100644 --- a/vendor/rector/rector-symfony/src/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php +++ b/vendor/rector/rector-symfony/src/Rector/MethodCall/VarDumperTestTraitMethodArgsRector.php @@ -29,9 +29,9 @@ final class VarDumperTestTraitMethodArgsRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php b/vendor/rector/rector-symfony/src/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php index f1bb434c5fe..2782574c4fd 100644 --- a/vendor/rector/rector-symfony/src/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php +++ b/vendor/rector/rector-symfony/src/Rector/New_/PropertyAccessorCreationBooleanToFlagsRector.php @@ -47,9 +47,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/New_/PropertyPathMapperToDataMapperRector.php b/vendor/rector/rector-symfony/src/Rector/New_/PropertyPathMapperToDataMapperRector.php index b7d4104764f..2bebbda81db 100644 --- a/vendor/rector/rector-symfony/src/Rector/New_/PropertyPathMapperToDataMapperRector.php +++ b/vendor/rector/rector-symfony/src/Rector/New_/PropertyPathMapperToDataMapperRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/New_/RootNodeTreeBuilderRector.php b/vendor/rector/rector-symfony/src/Rector/New_/RootNodeTreeBuilderRector.php index 85f74ae81de..f2923edd5d0 100644 --- a/vendor/rector/rector-symfony/src/Rector/New_/RootNodeTreeBuilderRector.php +++ b/vendor/rector/rector-symfony/src/Rector/New_/RootNodeTreeBuilderRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class]; } /** - * @param New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->class, new \PHPStan\Type\ObjectType('Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder'))) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php b/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php index 39ff2365e86..cde14445168 100644 --- a/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php +++ b/vendor/rector/rector-symfony/src/Rector/New_/StringToArrayArgumentProcessRector.php @@ -59,9 +59,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\New_::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param New_|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $expr = $node instanceof \PhpParser\Node\Expr\New_ ? $node->class : $node->var; if ($this->isObjectType($expr, new \PHPStan\Type\ObjectType('Symfony\\Component\\Process\\Process'))) { diff --git a/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php b/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php index 47a2e07de99..42b2d10539b 100644 --- a/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Property/JMSInjectPropertyToConstructorInjectionRector.php @@ -71,9 +71,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Property::class]; } /** - * @param Property $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNode($node); if (!$phpDocInfo instanceof \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo) { diff --git a/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php b/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php index 34a3c28e0b9..e6143602470 100644 --- a/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php +++ b/vendor/rector/rector-symfony/src/Rector/Return_/SimpleFunctionAndFilterRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->expr === null) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php b/vendor/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php index 034c00fdc7b..fa037ec7eef 100644 --- a/vendor/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php +++ b/vendor/rector/rector-symfony/src/Rector/StaticCall/AddMessageToEqualsResponseCodeRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param StaticCall|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'assertEquals')) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php b/vendor/rector/rector-symfony/src/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php index eb8968c7ac6..f3831685310 100644 --- a/vendor/rector/rector-symfony/src/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php +++ b/vendor/rector/rector-symfony/src/Rector/StaticCall/BinaryFileResponseCreateToNewInstanceRector.php @@ -50,9 +50,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->class instanceof \PhpParser\Node\Name) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php b/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php index 7c9b3a1f61a..13fa0f11f1d 100644 --- a/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php +++ b/vendor/rector/rector-symfony/src/Rector/StaticCall/ParseFileRector.php @@ -49,9 +49,9 @@ final class ParseFileRector extends \Rector\Core\Rector\AbstractRector /** * Process Node of matched type * - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->name, 'parse')) { return null; diff --git a/vendor/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php b/vendor/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php index 3ff5f66eb77..27015437469 100644 --- a/vendor/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php +++ b/vendor/rector/rector-symfony/src/Rector/StaticCall/ProcessBuilderInstanceRector.php @@ -27,9 +27,9 @@ final class ProcessBuilderInstanceRector extends \Rector\Core\Rector\AbstractRec return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->class instanceof \PhpParser\Node\Name) { return null; diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index 4f21f1e8e11..39890433d66 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -12,8 +12,8 @@ if (!class_exists('GenerateChangelogCommand', false) && !interface_exists('Gener if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20211210\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075', false) && !interface_exists('ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075', false) && !trait_exists('ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075', false)) { - spl_autoload_call('RectorPrefix20211210\ComposerAutoloaderInit5b95b9935bf71870ed295f9acb37b075'); +if (!class_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false) && !interface_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false) && !trait_exists('ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198', false)) { + spl_autoload_call('RectorPrefix20211210\ComposerAutoloaderInit3bc916bb193a710b4ba05e39509fa198'); } 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('RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\Statement'); @@ -81,9 +81,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20211210\print_node(...func_get_args()); } } -if (!function_exists('composerRequire5b95b9935bf71870ed295f9acb37b075')) { - function composerRequire5b95b9935bf71870ed295f9acb37b075() { - return \RectorPrefix20211210\composerRequire5b95b9935bf71870ed295f9acb37b075(...func_get_args()); +if (!function_exists('composerRequire3bc916bb193a710b4ba05e39509fa198')) { + function composerRequire3bc916bb193a710b4ba05e39509fa198() { + return \RectorPrefix20211210\composerRequire3bc916bb193a710b4ba05e39509fa198(...func_get_args()); } } if (!function_exists('scanPath')) { diff --git a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/FlexForms/Rector/FlexFormRectorInterface.php b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/FlexForms/Rector/FlexFormRectorInterface.php index 8e27329ae78..4b55584b75f 100644 --- a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/FlexForms/Rector/FlexFormRectorInterface.php +++ b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/FlexForms/Rector/FlexFormRectorInterface.php @@ -7,5 +7,8 @@ use DOMDocument; use Rector\Core\Contract\Rector\RectorInterface; interface FlexFormRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface { - public function transform(\DOMDocument $domDocument) : bool; + /** + * @param \DOMDocument $domDocument + */ + public function transform($domDocument) : bool; } diff --git a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Fluid/Rector/FluidRectorInterface.php b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Fluid/Rector/FluidRectorInterface.php index 1f3521de630..9c6d002cc41 100644 --- a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Fluid/Rector/FluidRectorInterface.php +++ b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Fluid/Rector/FluidRectorInterface.php @@ -7,5 +7,8 @@ use Rector\Core\Contract\Rector\RectorInterface; use Rector\Core\ValueObject\Application\File; interface FluidRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface { - public function transform(\Rector\Core\ValueObject\Application\File $file) : void; + /** + * @param \Rector\Core\ValueObject\Application\File $file + */ + public function transform($file) : void; } diff --git a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Resources/IconRectorInterface.php b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Resources/IconRectorInterface.php index 137d14238c6..c2caaa974a9 100644 --- a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Resources/IconRectorInterface.php +++ b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Resources/IconRectorInterface.php @@ -7,5 +7,8 @@ use Rector\Core\Contract\Rector\RectorInterface; use Rector\Core\ValueObject\Application\File; interface IconRectorInterface extends \Rector\Core\Contract\Rector\RectorInterface { - public function refactorFile(\Rector\Core\ValueObject\Application\File $file) : void; + /** + * @param \Rector\Core\ValueObject\Application\File $file + */ + public function refactorFile($file) : void; } diff --git a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Yaml/Form/FormYamlRectorInterface.php b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Yaml/Form/FormYamlRectorInterface.php index f30e4ab8ed4..4b1d4859a9f 100644 --- a/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Yaml/Form/FormYamlRectorInterface.php +++ b/vendor/ssch/typo3-rector/src/Contract/FileProcessor/Yaml/Form/FormYamlRectorInterface.php @@ -10,5 +10,5 @@ interface FormYamlRectorInterface extends \Rector\Core\Contract\Rector\RectorInt * @param mixed[] $yaml * @return mixed[] */ - public function refactor(array $yaml) : array; + public function refactor($yaml) : array; } diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/ExtensionComposerRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/ExtensionComposerRector.php index 23cedc9cd0f..d6f1254b48a 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/ExtensionComposerRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/ExtensionComposerRector.php @@ -33,7 +33,10 @@ final class ExtensionComposerRector implements \Rector\Composer\Contract\Rector\ { $this->currentFileProvider = $currentFileProvider; } - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { if ('typo3-cms-extension' !== $composerJson->getType()) { return; @@ -55,7 +58,7 @@ final class ExtensionComposerRector implements \Rector\Composer\Contract\Rector\ /** * @param array $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $this->defaultTypo3VersionConstraint = $configuration[self::TYPO3_VERSION_CONSTRAINT] ?? '*'; } diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/RemoveCmsPackageDirFromExtraComposerRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/RemoveCmsPackageDirFromExtraComposerRector.php index 5e52b3ee89e..f888e8debab 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/RemoveCmsPackageDirFromExtraComposerRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Composer/Rector/RemoveCmsPackageDirFromExtraComposerRector.php @@ -18,7 +18,10 @@ final class RemoveCmsPackageDirFromExtraComposerRector implements \Rector\Compos * @var string */ private const TYPO3_CMS = 'typo3/cms'; - public function refactor(\RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson) : void + /** + * @param \Symplify\ComposerJsonManipulator\ValueObject\ComposerJson $composerJson + */ + public function refactor($composerJson) : void { $extra = $composerJson->getExtra(); if (!isset($extra[self::TYPO3_CMS])) { @@ -30,7 +33,10 @@ final class RemoveCmsPackageDirFromExtraComposerRector implements \Rector\Compos unset($extra[self::TYPO3_CMS]['cms-package-dir']); $composerJson->setExtra($extra); } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { throw new \BadMethodCallException('Not allowed. No configuration option available'); } diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/FlexForms/Rector/RenderTypeFlexFormRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/FlexForms/Rector/RenderTypeFlexFormRector.php index 816c8cd03eb..a266771c4fc 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/FlexForms/Rector/RenderTypeFlexFormRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/FlexForms/Rector/RenderTypeFlexFormRector.php @@ -13,7 +13,10 @@ use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; final class RenderTypeFlexFormRector implements \Ssch\TYPO3Rector\Contract\FileProcessor\FlexForms\Rector\FlexFormRectorInterface { - public function transform(\DOMDocument $domDocument) : bool + /** + * @param \DOMDocument $domDocument + */ + public function transform($domDocument) : bool { $xpath = new \DOMXPath($domDocument); /** @var DOMNodeList $elements */ diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Fluid/Rector/DefaultSwitchFluidRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Fluid/Rector/DefaultSwitchFluidRector.php index 241746ba981..cdd9b64936d 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Fluid/Rector/DefaultSwitchFluidRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Fluid/Rector/DefaultSwitchFluidRector.php @@ -21,7 +21,10 @@ final class DefaultSwitchFluidRector implements \Ssch\TYPO3Rector\Contract\FileP * @var string */ private const REPLACEMENT = '$2'; - public function transform(\Rector\Core\ValueObject\Application\File $file) : void + /** + * @param \Rector\Core\ValueObject\Application\File $file + */ + public function transform($file) : void { $content = $file->getFileContent(); $content = \RectorPrefix20211210\Nette\Utils\Strings::replace($content, self::PATTERN, self::REPLACEMENT); diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Resources/Icons/Rector/IconsRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Resources/Icons/Rector/IconsRector.php index dd7d13750b5..35b39c79167 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Resources/Icons/Rector/IconsRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Resources/Icons/Rector/IconsRector.php @@ -33,7 +33,10 @@ final class IconsRector implements \Ssch\TYPO3Rector\Contract\FileProcessor\Reso $this->removedAndAddedFilesCollector = $removedAndAddedFilesCollector; $this->smartFileSystem = $smartFileSystem; } - public function refactorFile(\Rector\Core\ValueObject\Application\File $file) : void + /** + * @param \Rector\Core\ValueObject\Application\File $file + */ + public function refactorFile($file) : void { $smartFileInfo = $file->getSmartFileInfo(); $newFullPath = $this->createIconPath($file); diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AbstractTypoScriptRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AbstractTypoScriptRector.php index e0f725cc693..bd8be9074e1 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AbstractTypoScriptRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AbstractTypoScriptRector.php @@ -20,16 +20,28 @@ abstract class AbstractTypoScriptRector implements \RectorPrefix20211210\Helmich * @var \Helmich\TypoScriptParser\Parser\AST\Statement|null */ protected $newStatement; - public function enterTree(array $statements) : void + /** + * @param mixed[] $statements + */ + public function enterTree($statements) : void { } - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function enterNode($statement) : void { } - public function exitNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function exitNode($statement) : void { } - public function exitTree(array $statements) : void + /** + * @param mixed[] $statements + */ + public function exitTree($statements) : void { } public function hasChanged() : bool diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AdditionalHeadersToArrayTypoScriptRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AdditionalHeadersToArrayTypoScriptRector.php index a88fedf61aa..fe18ed5f7ac 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AdditionalHeadersToArrayTypoScriptRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/AdditionalHeadersToArrayTypoScriptRector.php @@ -12,7 +12,10 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; */ final class AdditionalHeadersToArrayTypoScriptRector extends \Ssch\TYPO3Rector\FileProcessor\TypoScript\Rector\AbstractTypoScriptRector { - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function enterNode($statement) : void { if (!$statement instanceof \RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\Operator\Assignment) { return; diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/ExtbasePersistenceTypoScriptRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/ExtbasePersistenceTypoScriptRector.php index 473e93bc8a2..154c5420a92 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/ExtbasePersistenceTypoScriptRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/ExtbasePersistenceTypoScriptRector.php @@ -46,7 +46,10 @@ final class ExtbasePersistenceTypoScriptRector extends \Ssch\TYPO3Rector\FilePro $this->filename = \getcwd() . '/Configuration_Extbase_Persistence_Classes.php'; $this->fileTemplate = $templateFinder->getExtbasePersistenceConfiguration(); } - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function enterNode($statement) : void { if (!$statement instanceof \RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\Operator\Assignment) { return; @@ -98,7 +101,10 @@ CODE_SAMPLE { return 'We have converted from TypoScript extbase persistence to a PHP File'; } - public function configure(array $configuration) : void + /** + * @param mixed[] $configuration + */ + public function configure($configuration) : void { $filename = $configuration[self::FILENAME] ?? null; if (null !== $filename) { diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/FileIncludeToImportStatementTypoScriptRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/FileIncludeToImportStatementTypoScriptRector.php index 7b731323a40..bd1fcbfb63d 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/FileIncludeToImportStatementTypoScriptRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/FileIncludeToImportStatementTypoScriptRector.php @@ -24,7 +24,10 @@ final class FileIncludeToImportStatementTypoScriptRector extends \Ssch\TYPO3Rect { $this->currentFileProvider = $currentFileProvider; } - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function enterNode($statement) : void { if (!$statement instanceof \RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\FileIncludeStatement) { return; diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/OldConditionToExpressionLanguageTypoScriptRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/OldConditionToExpressionLanguageTypoScriptRector.php index 70cd3dce9e4..827f71343ac 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/OldConditionToExpressionLanguageTypoScriptRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/TypoScript/Rector/OldConditionToExpressionLanguageTypoScriptRector.php @@ -34,7 +34,10 @@ final class OldConditionToExpressionLanguageTypoScriptRector extends \Ssch\TYPO3 $this->currentFileProvider = $currentFileProvider; $this->conditionMatchers = $conditionMatchers; } - public function enterNode(\Helmich\TypoScriptParser\Parser\AST\Statement $statement) : void + /** + * @param \Helmich\TypoScriptParser\Parser\AST\Statement $statement + */ + public function enterNode($statement) : void { if (!$statement instanceof \RectorPrefix20211210\Helmich\TypoScriptParser\Parser\AST\ConditionalStatement) { return; diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/EmailFinisherRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/EmailFinisherRector.php index ad34daf24ef..7094c4599bf 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/EmailFinisherRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/EmailFinisherRector.php @@ -45,7 +45,7 @@ final class EmailFinisherRector implements \Ssch\TYPO3Rector\Contract\FileProces /** * @param mixed[] $yaml */ - public function refactor(array $yaml) : array + public function refactor($yaml) : array { $appliedForFinishers = \false; $appliedForVariants = \false; diff --git a/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/TranslationFileRector.php b/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/TranslationFileRector.php index 399fcd0d2b7..da0efa40496 100644 --- a/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/TranslationFileRector.php +++ b/vendor/ssch/typo3-rector/src/FileProcessor/Yaml/Form/Rector/TranslationFileRector.php @@ -46,7 +46,10 @@ TYPO3: CODE_SAMPLE )]); } - public function refactor(array $yaml) : array + /** + * @param mixed[] $yaml + */ + public function refactor($yaml) : array { return $this->refactorTranslationFile($yaml); } diff --git a/vendor/ssch/typo3-rector/src/Rector/Experimental/OptionalConstructorToHardRequirementRector.php b/vendor/ssch/typo3-rector/src/Rector/Experimental/OptionalConstructorToHardRequirementRector.php index e416553f4c9..d5c2dca80ed 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Experimental/OptionalConstructorToHardRequirementRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Experimental/OptionalConstructorToHardRequirementRector.php @@ -30,9 +30,9 @@ final class OptionalConstructorToHardRequirementRector extends \Rector\Core\Rect return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, \Rector\Core\ValueObject\MethodName::CONSTRUCT)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrConnectionAddDocumentsToWriteServiceAddDocumentsRector.php b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrConnectionAddDocumentsToWriteServiceAddDocumentsRector.php index 4cad505940a..93e7fcf33f6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrConnectionAddDocumentsToWriteServiceAddDocumentsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrConnectionAddDocumentsToWriteServiceAddDocumentsRector.php @@ -36,9 +36,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('ApacheSolrForTypo3\\Solr\\System\\Solr\\SolrConnection'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrSiteToSolrRepositoryRector.php b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrSiteToSolrRepositoryRector.php index b7b09cda9b3..fe2a499feac 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrSiteToSolrRepositoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v8/SolrSiteToSolrRepositoryRector.php @@ -36,9 +36,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector.php b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector.php index 957844375f7..3cb1346541d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Extensions/solr/v9/ApacheSolrDocumentToSolariumDocumentRector.php @@ -24,9 +24,9 @@ final class ApacheSolrDocumentToSolariumDocumentRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('Apache_Solr_Document'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/General/ConvertImplicitVariablesToExplicitGlobalsRector.php b/vendor/ssch/typo3-rector/src/Rector/General/ConvertImplicitVariablesToExplicitGlobalsRector.php index 6eb3a3e6363..21110ed790a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/General/ConvertImplicitVariablesToExplicitGlobalsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/General/ConvertImplicitVariablesToExplicitGlobalsRector.php @@ -46,9 +46,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Variable::class]; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node, ['TYPO3_CONF_VARS', 'TBE_MODULES'])) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/General/ExtEmConfRector.php b/vendor/ssch/typo3-rector/src/Rector/General/ExtEmConfRector.php index c243f893354..c61ccf05021 100644 --- a/vendor/ssch/typo3-rector/src/Rector/General/ExtEmConfRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/General/ExtEmConfRector.php @@ -47,9 +47,9 @@ final class ExtEmConfRector extends \Rector\Core\Rector\AbstractRector implement return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->var instanceof \PhpParser\Node\Expr\ArrayDimFetch) { return null; @@ -211,7 +211,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $additionalValuesToBeRemoved = $configuration[self::ADDITIONAL_VALUES_TO_BE_REMOVED] ?? []; $this->valuesToBeRemoved = \array_merge($this->valuesToBeRemoved, $additionalValuesToBeRemoved); diff --git a/vendor/ssch/typo3-rector/src/Rector/General/MethodGetInstanceToMakeInstanceCallRector.php b/vendor/ssch/typo3-rector/src/Rector/General/MethodGetInstanceToMakeInstanceCallRector.php index 169348d647e..46e2a7f7166 100644 --- a/vendor/ssch/typo3-rector/src/Rector/General/MethodGetInstanceToMakeInstanceCallRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/General/MethodGetInstanceToMakeInstanceCallRector.php @@ -37,9 +37,9 @@ final class MethodGetInstanceToMakeInstanceCallRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; @@ -69,7 +69,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $classes = $configuration[self::CLASSES_GET_INSTANCE_TO_MAKE_INSTANCE] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($classes); diff --git a/vendor/ssch/typo3-rector/src/Rector/Migrations/RenameClassMapAliasRector.php b/vendor/ssch/typo3-rector/src/Rector/Migrations/RenameClassMapAliasRector.php index 8cf8e86cd65..082b8cc5a95 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Migrations/RenameClassMapAliasRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Migrations/RenameClassMapAliasRector.php @@ -97,9 +97,9 @@ CODE_SAMPLE return [\Rector\Core\PhpParser\Node\CustomNode\FileWithoutNamespace::class, \PhpParser\Node\Name::class, \PhpParser\Node\Stmt\Property::class, \PhpParser\Node\FunctionLike::class, \PhpParser\Node\Stmt\Expression::class, \PhpParser\Node\Stmt\ClassLike::class, \PhpParser\Node\Stmt\Namespace_::class, \PhpParser\Node\Scalar\String_::class]; } /** - * @param FunctionLike|Name|ClassLike|Expression|Namespace_|Property|FileWithoutNamespace|String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Scalar\String_) { return $this->stringClassNameToClassConstantRectorIfPossible($node); @@ -109,7 +109,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $classAliasMaps = $configuration[self::CLASS_ALIAS_MAPS] ?? $configuration; foreach ($classAliasMaps as $file) { diff --git a/vendor/ssch/typo3-rector/src/Rector/PostRector/FullQualifiedNamePostRector.php b/vendor/ssch/typo3-rector/src/Rector/PostRector/FullQualifiedNamePostRector.php index f182c061a05..b7ba3cb6001 100644 --- a/vendor/ssch/typo3-rector/src/Rector/PostRector/FullQualifiedNamePostRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/PostRector/FullQualifiedNamePostRector.php @@ -59,7 +59,10 @@ final class FullQualifiedNamePostRector extends \Rector\PostRector\Rector\Abstra $this->fileInfoMatcher = $fileInfoMatcher; $this->changeNameImportingPostRectorSkipConfiguration($this->parameterProvider); } - public function enterNode(\PhpParser\Node $node) : ?\PhpParser\Node + /** + * @param \PhpParser\Node $node + */ + public function enterNode($node) : ?\PhpParser\Node { $file = $this->currentFileProvider->getFile(); if (!$file instanceof \Rector\Core\ValueObject\Application\File) { diff --git a/vendor/ssch/typo3-rector/src/Rector/Tca/AbstractTcaRector.php b/vendor/ssch/typo3-rector/src/Rector/Tca/AbstractTcaRector.php index 78badfc260a..f7d442ba646 100644 --- a/vendor/ssch/typo3-rector/src/Rector/Tca/AbstractTcaRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/Tca/AbstractTcaRector.php @@ -49,9 +49,9 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\Array_::class]; } /** - * @param Array_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->resetInnerState(); $this->hasAstBeenChanged = \false; @@ -96,7 +96,7 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector * * @param Array_ $columns a list of TCA definitions for columns */ - protected function refactorColumnList(\PhpParser\Node\Expr\Array_ $columns) : void + protected function refactorColumnList($columns) : void { foreach ($columns->items as $columnArrayItem) { if (!$columnArrayItem instanceof \PhpParser\Node\Expr\ArrayItem) { @@ -112,8 +112,9 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector } /** * @return bool whether or not the given Array_ is a full TCA definition for a Table + * @param \PhpParser\Node\Expr\Array_ $possibleTcaArray */ - protected function isFullTcaDefinition(\PhpParser\Node\Expr\Array_ $possibleTcaArray) : bool + protected function isFullTcaDefinition($possibleTcaArray) : bool { $columns = $this->extractSubArrayByKey($possibleTcaArray, 'columns'); $ctrl = $this->extractArrayItemByKey($possibleTcaArray, 'ctrl'); @@ -121,8 +122,9 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector } /** * @return bool whether the given array item is the TCA definition of a single column + * @param \PhpParser\Node\Expr\ArrayItem $arrayItem */ - protected function isSingleTcaColumn(\PhpParser\Node\Expr\ArrayItem $arrayItem) : bool + protected function isSingleTcaColumn($arrayItem) : bool { $labelNode = $this->extractArrayItemByKey($arrayItem->value, self::LABEL); if (!$labelNode instanceof \PhpParser\Node\Expr\ArrayItem) { @@ -143,15 +145,16 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector * @param Expr $columnName the key in above example (typically String_('column_name')) * @param Expr $columnTca the value in above example (typically an associative Array with stuff like 'label', 'config', 'exclude', ...) */ - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + protected function refactorColumn($columnName, $columnTca) : void { // override this as needed in child-classes } /** * refactors an TCA types array such as [ '0' => [ 'showitem' => 'field_a,field_b' ], '1' => [ 'showitem' => * 'field_a'] ] + * @param \PhpParser\Node\Expr\Array_ $types */ - protected function refactorTypes(\PhpParser\Node\Expr\Array_ $types) : void + protected function refactorTypes($types) : void { foreach ($types->items as $typeItem) { if (!$typeItem instanceof \PhpParser\Node\Expr\ArrayItem) { @@ -168,15 +171,18 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector /** * refactors a single TCA type item with key `typeKey` such as [ 'showitem' => 'field_a,field_b' ], '1' => [ * 'showitem' => 'field_a'] + * @param \PhpParser\Node\Expr $typeKey + * @param \PhpParser\Node\Expr $typeConfig */ - protected function refactorType(\PhpParser\Node\Expr $typeKey, \PhpParser\Node\Expr $typeConfig) : void + protected function refactorType($typeKey, $typeConfig) : void { // override this as needed in child-classes } /** * refactors an TCA ctrl section such as ['label' => 'foo', 'tstamp' => 'tstamp', 'crdate' => 'crdate'] + * @param \PhpParser\Node\Expr\Array_ $ctrl */ - protected function refactorCtrl(\PhpParser\Node\Expr\Array_ $ctrl) : void + protected function refactorCtrl($ctrl) : void { // override this as needed in child-classes } @@ -185,7 +191,7 @@ abstract class AbstractTcaRector extends \Rector\Core\Rector\AbstractRector * @param ArrayItem $newItem The item to be inserted * @param string $key The key after which the ArrayItem should be inserted */ - protected function insertItemAfterKey(\PhpParser\Node\Expr\Array_ $array, \PhpParser\Node\Expr\ArrayItem $newItem, string $key) : void + protected function insertItemAfterKey($array, $newItem, $key) : void { $positionOfTypeInConfig = 0; foreach ($array->items as $configNode) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/BackendUtilityGetViewDomainToPageRouterRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/BackendUtilityGetViewDomainToPageRouterRector.php index bcae9bdd89e..f0cb3dda1c1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/BackendUtilityGetViewDomainToPageRouterRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/BackendUtilityGetViewDomainToPageRouterRector.php @@ -25,9 +25,9 @@ final class BackendUtilityGetViewDomainToPageRouterRector extends \Rector\Core\R return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php index 2b56b6bfd53..cc769f9ad94 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ChangeDefaultCachingFrameworkNamesRector.php @@ -26,9 +26,9 @@ final class ChangeDefaultCachingFrameworkNamesRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isObjectType($node->var, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Cache\\CacheManager'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethodRector.php index 67b7ec6b4eb..419f71a01ec 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ConfigurationManagerAddControllerConfigurationMethodRector.php @@ -30,9 +30,9 @@ final class ConfigurationManagerAddControllerConfigurationMethodRector extends \ return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Configuration\\AbstractConfigurationManager'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php index 136ebd22ed6..f5343c05bd7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/ForceTemplateParsingInTsfeAndTemplateServiceRector.php @@ -46,9 +46,9 @@ final class ForceTemplateParsingInTsfeAndTemplateServiceRector extends \Rector\C return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunctionRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunctionRector.php index baa1be64685..368b5e01123 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunctionRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RefactorIdnaEncodeMethodToNativeFunctionRector.php @@ -28,9 +28,9 @@ final class RefactorIdnaEncodeMethodToNativeFunctionRector extends \Rector\Core\ return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemovePropertyExtensionNameRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemovePropertyExtensionNameRector.php index 882a4a38fd7..2ecde05c02b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemovePropertyExtensionNameRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemovePropertyExtensionNameRector.php @@ -23,9 +23,9 @@ final class RemovePropertyExtensionNameRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveSeliconFieldPathRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveSeliconFieldPathRector.php index 271d1bc993e..238b613a59d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveSeliconFieldPathRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveSeliconFieldPathRector.php @@ -48,9 +48,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopyRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopyRector.php index d6777f102fb..a9fe87bc658 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopyRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/RemoveTcaOptionSetToDefaultOnCopyRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/SetSystemLocaleFromSiteLanguageRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/SetSystemLocaleFromSiteLanguageRector.php index 5b72eccbab2..10af26161fb 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/SetSystemLocaleFromSiteLanguageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/SetSystemLocaleFromSiteLanguageRector.php @@ -33,9 +33,9 @@ final class SetSystemLocaleFromSiteLanguageRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController')) && !$this->typo3NodeResolver->isAnyMethodCallOnGlobals($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/SwiftMailerBasedMailMessageToMailerBasedMessageRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/SwiftMailerBasedMailMessageToMailerBasedMessageRector.php index 3f2b4eef1cb..d0bc3bea031 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/SwiftMailerBasedMailMessageToMailerBasedMessageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/SwiftMailerBasedMailMessageToMailerBasedMessageRector.php @@ -26,9 +26,9 @@ final class SwiftMailerBasedMailMessageToMailerBasedMessageRector extends \Recto return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Mail\\MailMessage'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModulesRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModulesRector.php index 5cede4a8f77..0cf61acc947 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModulesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseControllerClassesInExtbasePluginsAndModulesRector.php @@ -29,9 +29,9 @@ final class UseControllerClassesInExtbasePluginsAndModulesRector extends \Rector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseMetaDataAspectRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseMetaDataAspectRector.php index 8286ea15495..4f59ce9fa7d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseMetaDataAspectRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseMetaDataAspectRector.php @@ -23,9 +23,9 @@ final class UseMetaDataAspectRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Resource\\File'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseNativePhpHex2binMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseNativePhpHex2binMethodRector.php index ae132237aac..322e94777b5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseNativePhpHex2binMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseNativePhpHex2binMethodRector.php @@ -24,9 +24,9 @@ final class UseNativePhpHex2binMethodRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Utility\\TypeHandlingUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguageRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguageRector.php index 15060871920..e234d98abcd 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v0/UseTwoLetterIsoCodeFromSiteLanguageRector.php @@ -34,9 +34,9 @@ final class UseTwoLetterIsoCodeFromSiteLanguageRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController')) && !$this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v1/BackendUtilityEditOnClickRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v1/BackendUtilityEditOnClickRector.php index 10e86cf03ad..c598e69b8d3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v1/BackendUtilityEditOnClickRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v1/BackendUtilityEditOnClickRector.php @@ -28,9 +28,9 @@ final class BackendUtilityEditOnClickRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RefactorInternalPropertiesOfTSFERector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RefactorInternalPropertiesOfTSFERector.php index 758577106dc..a6d67242daf 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RefactorInternalPropertiesOfTSFERector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RefactorInternalPropertiesOfTSFERector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RegisterPluginWithVendorNameRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RegisterPluginWithVendorNameRector.php index 618366f3b74..de5c63c0d9d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RegisterPluginWithVendorNameRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RegisterPluginWithVendorNameRector.php @@ -26,9 +26,9 @@ final class RegisterPluginWithVendorNameRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RemoveEnableMultiSelectFilterTextfieldRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RemoveEnableMultiSelectFilterTextfieldRector.php index 2f416545763..ca838a445c1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v1/RemoveEnableMultiSelectFilterTextfieldRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v1/RemoveEnableMultiSelectFilterTextfieldRector.php @@ -43,7 +43,11 @@ CODE_SAMPLE CODE_SAMPLE )]); } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { $config = $this->extractSubArrayByKey($columnTca, self::CONFIG); if (!$config instanceof \PhpParser\Node\Expr\Array_) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php index 66a736d6e5d..1cb9220baef 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v1/SendNotifyEmailToMailApiRector.php @@ -76,9 +76,9 @@ final class SendNotifyEmailToMailApiRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v2/ExcludeServiceKeysToArrayRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v2/ExcludeServiceKeysToArrayRector.php index eefb50f06bf..43091c266a7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v2/ExcludeServiceKeysToArrayRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v2/ExcludeServiceKeysToArrayRector.php @@ -34,9 +34,9 @@ final class ExcludeServiceKeysToArrayRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isExpectedObjectType($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponseRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponseRector.php index 1691eed34a7..595194691b2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponseRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v2/InjectEnvironmentServiceIfNeededInResponseRector.php @@ -49,9 +49,9 @@ final class InjectEnvironmentServiceIfNeededInResponseRector extends \Rector\Cor return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Response'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v2/MoveApplicationContextToEnvironmentApiRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v2/MoveApplicationContextToEnvironmentApiRector.php index 26dc2d53dbb..302ece07e94 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v2/MoveApplicationContextToEnvironmentApiRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v2/MoveApplicationContextToEnvironmentApiRector.php @@ -23,9 +23,9 @@ final class MoveApplicationContextToEnvironmentApiRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseActionControllerRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseActionControllerRector.php index 89db3f61ca9..a469ad02c6b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseActionControllerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseActionControllerRector.php @@ -23,9 +23,9 @@ final class UseActionControllerRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (null === $node->extends) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseTypo3InformationForCopyRightNoticeRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseTypo3InformationForCopyRightNoticeRector.php index 1012b8138b3..43b63d6daef 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseTypo3InformationForCopyRightNoticeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v2/UseTypo3InformationForCopyRightNoticeRector.php @@ -23,9 +23,9 @@ final class UseTypo3InformationForCopyRightNoticeRector extends \Rector\Core\Rec return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveExcludeOnTransOrigPointerFieldRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveExcludeOnTransOrigPointerFieldRector.php index d3987584338..2672491351a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveExcludeOnTransOrigPointerFieldRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveExcludeOnTransOrigPointerFieldRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSectionRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSectionRector.php index 038c54cd4f2..4d80cd52768 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSectionRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v3/RemoveShowRecordFieldListInsideInterfaceSectionRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v3/SubstituteResourceFactoryRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v3/SubstituteResourceFactoryRector.php index b00abfe4eaf..c96f9858b49 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v3/SubstituteResourceFactoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v3/SubstituteResourceFactoryRector.php @@ -23,9 +23,9 @@ final class SubstituteResourceFactoryRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Resource\\ResourceFactory'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3InformationRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3InformationRector.php index 693b395f930..0bfabd586f3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3InformationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3InformationRector.php @@ -26,9 +26,9 @@ final class UseClassTypo3InformationRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node->name, self::CONSTANTS_TO_REFACTOR)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3VersionRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3VersionRector.php index d3abbc930ef..4025be16a84 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3VersionRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v3/UseClassTypo3VersionRector.php @@ -26,9 +26,9 @@ final class UseClassTypo3VersionRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isNames($node->name, self::CONSTANTS_TO_REFACTOR)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v4/RemoveFormatConstantsEmailFinisherRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v4/RemoveFormatConstantsEmailFinisherRector.php index 07fa5973702..c64207bfafc 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v4/RemoveFormatConstantsEmailFinisherRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v4/RemoveFormatConstantsEmailFinisherRector.php @@ -43,9 +43,9 @@ final class RemoveFormatConstantsEmailFinisherRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\ClassConstFetch::class]; } /** - * @param ClassConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->class, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Form\\Domain\\Finishers\\EmailFinisher'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php index ca8c1df2eec..28b84db8a37 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v4/SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector.php @@ -29,9 +29,9 @@ final class SubstituteGeneralUtilityMethodsWithNativePhpFunctionsRector extends return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php index d40831424f2..0a404d5dd2f 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UnifiedFileNameValidatorRector.php @@ -24,9 +24,9 @@ final class UnifiedFileNameValidatorRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\ConstFetch::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param ConstFetch|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseFileGetContentsForGetUrlRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseFileGetContentsForGetUrlRector.php index 7878d030b2e..4ecf279c6ca 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseFileGetContentsForGetUrlRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseFileGetContentsForGetUrlRector.php @@ -24,9 +24,9 @@ final class UseFileGetContentsForGetUrlRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseIconsFromSubFolderInIconRegistryRector.php b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseIconsFromSubFolderInIconRegistryRector.php index 2ecc51a3981..42687a54c2e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseIconsFromSubFolderInIconRegistryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v10/v4/UseIconsFromSubFolderInIconRegistryRector.php @@ -28,9 +28,9 @@ final class UseIconsFromSubFolderInIconRegistryRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Imaging\\IconRegistry'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTimeRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTimeRector.php index 08b5250a074..d78bb745c40 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTimeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/DateTimeAspectInsteadOfGlobalsExecTimeRector.php @@ -31,9 +31,9 @@ final class DateTimeAspectInsteadOfGlobalsExecTimeRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->typo3NodeResolver->isTypo3Globals($node, [\Ssch\TYPO3Rector\Helper\Typo3NodeResolver::EXEC_TIME, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::SIM_ACCESS_TIME, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::SIM_EXEC_TIME, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::ACCESS_TIME])) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php index 377d41cac27..04b13c01790 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/ExtbaseControllerActionsMustReturnResponseInterfaceRector.php @@ -37,9 +37,9 @@ final class ExtbaseControllerActionsMustReturnResponseInterfaceRector extends \R return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/ForwardResponseInsteadOfForwardMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/ForwardResponseInsteadOfForwardMethodRector.php index 8a8ba33afb7..21c9061f55b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/ForwardResponseInsteadOfForwardMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/ForwardResponseInsteadOfForwardMethodRector.php @@ -57,9 +57,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $forwardMethodCalls = $this->extractForwardMethodCalls($node); if ([] === $forwardMethodCalls) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/GetClickMenuOnIconTagParametersRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/GetClickMenuOnIconTagParametersRector.php index 727621d00d3..ff22674cef1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/GetClickMenuOnIconTagParametersRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/GetClickMenuOnIconTagParametersRector.php @@ -23,9 +23,9 @@ final class GetClickMenuOnIconTagParametersRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveAddQueryStringMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveAddQueryStringMethodRector.php index 95cae9be3ab..fa45a84b6c3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveAddQueryStringMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveAddQueryStringMethodRector.php @@ -40,9 +40,9 @@ final class RemoveAddQueryStringMethodRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveLanguageModeMethodsFromTypo3QuerySettingsRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveLanguageModeMethodsFromTypo3QuerySettingsRector.php index 9bf8e14bd5d..6624f09bddc 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveLanguageModeMethodsFromTypo3QuerySettingsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/RemoveLanguageModeMethodsFromTypo3QuerySettingsRector.php @@ -39,9 +39,9 @@ final class RemoveLanguageModeMethodsFromTypo3QuerySettingsRector extends \Recto return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Typo3QuerySettings'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/SubstituteConstantsModeAndRequestTypeRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/SubstituteConstantsModeAndRequestTypeRector.php index 19813590d25..c9b0c2d0ee2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/SubstituteConstantsModeAndRequestTypeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/SubstituteConstantsModeAndRequestTypeRector.php @@ -41,9 +41,9 @@ final class SubstituteConstantsModeAndRequestTypeRector extends \Rector\Core\Rec return [\PhpParser\Node\Expr\ConstFetch::class, \PhpParser\Node\Expr\FuncCall::class]; } /** - * @param ConstFetch|FuncCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $fileInfo = $this->file->getSmartFileInfo(); if ($node instanceof \PhpParser\Node\Expr\FuncCall && $this->isName($node, 'defined')) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v0/UniqueListFromStringUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v0/UniqueListFromStringUtilityRector.php index 9916db2e53b..720250b9329 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v0/UniqueListFromStringUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v0/UniqueListFromStringUtilityRector.php @@ -23,9 +23,9 @@ final class UniqueListFromStringUtilityRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v2/MigrateFrameModuleToSvgTreeRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v2/MigrateFrameModuleToSvgTreeRector.php index 8b248e55f9e..206c2d27902 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v2/MigrateFrameModuleToSvgTreeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v2/MigrateFrameModuleToSvgTreeRector.php @@ -34,9 +34,9 @@ final class MigrateFrameModuleToSvgTreeRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v3/ReplaceStdAuthCodeWithHmacRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v3/ReplaceStdAuthCodeWithHmacRector.php index 56d5ae61e85..a9ed6f9b126 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v3/ReplaceStdAuthCodeWithHmacRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v3/ReplaceStdAuthCodeWithHmacRector.php @@ -36,9 +36,9 @@ final class ReplaceStdAuthCodeWithHmacRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php index 57f384e0967..866b37488a6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php @@ -36,9 +36,9 @@ final class SubstituteMethodRmFromListOfGeneralUtilityRector extends \Rector\Cor return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v3/SwitchBehaviorOfArrayUtilityMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v3/SwitchBehaviorOfArrayUtilityMethodsRector.php index 6fb1a9a2685..924d5a3bab1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v3/SwitchBehaviorOfArrayUtilityMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v3/SwitchBehaviorOfArrayUtilityMethodsRector.php @@ -23,9 +23,9 @@ final class SwitchBehaviorOfArrayUtilityMethodsRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php index f2edae32f79..c9170c3bd06 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php @@ -47,7 +47,11 @@ CODE_SAMPLE CODE_SAMPLE )]); } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { $config = $this->extractSubArrayByKey($columnTca, self::CONFIG); if (!$config instanceof \PhpParser\Node\Expr\Array_) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v4/ProvideCObjViaMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v4/ProvideCObjViaMethodRector.php index 313546b3924..a0ddb65fe9d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v4/ProvideCObjViaMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v4/ProvideCObjViaMethodRector.php @@ -43,9 +43,9 @@ final class ProvideCObjViaMethodRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v4/UseNativeFunctionInsteadOfGeneralUtilityShortMd5Rector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v4/UseNativeFunctionInsteadOfGeneralUtilityShortMd5Rector.php index a4db6616d53..44672d37242 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v4/UseNativeFunctionInsteadOfGeneralUtilityShortMd5Rector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v4/UseNativeFunctionInsteadOfGeneralUtilityShortMd5Rector.php @@ -33,9 +33,9 @@ final class UseNativeFunctionInsteadOfGeneralUtilityShortMd5Rector extends \Rect return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v5/FlexFormToolsArrayValueByPathRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v5/FlexFormToolsArrayValueByPathRector.php index c249ffaf579..5294d0b8ece 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v5/FlexFormToolsArrayValueByPathRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v5/FlexFormToolsArrayValueByPathRector.php @@ -25,9 +25,9 @@ final class FlexFormToolsArrayValueByPathRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Configuration\\FlexForm\\FlexFormTools'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v5/HandleCObjRendererATagParamsMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v5/HandleCObjRendererATagParamsMethodRector.php index 58c9cfe528a..a28a966b3a3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v5/HandleCObjRendererATagParamsMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v5/HandleCObjRendererATagParamsMethodRector.php @@ -23,9 +23,9 @@ final class HandleCObjRendererATagParamsMethodRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v5/RemoveDefaultInternalTypeDBRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v5/RemoveDefaultInternalTypeDBRector.php index 5d884cbe7e7..c550275cf50 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v5/RemoveDefaultInternalTypeDBRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v5/RemoveDefaultInternalTypeDBRector.php @@ -50,7 +50,11 @@ return [ CODE_SAMPLE )]); } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { $config = $this->extractSubArrayByKey($columnTca, self::CONFIG); if (!$config instanceof \PhpParser\Node\Expr\Array_) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v11/v5/ReplaceTSFEATagParamsCallOnGlobalsRector.php b/vendor/ssch/typo3-rector/src/Rector/v11/v5/ReplaceTSFEATagParamsCallOnGlobalsRector.php index 550b8046ceb..3afa474fc18 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v11/v5/ReplaceTSFEATagParamsCallOnGlobalsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v11/v5/ReplaceTSFEATagParamsCallOnGlobalsRector.php @@ -38,9 +38,9 @@ final class ReplaceTSFEATagParamsCallOnGlobalsRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveDivider2TabsConfigurationRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveDivider2TabsConfigurationRector.php index de213c1371c..07692c668c2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveDivider2TabsConfigurationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveDivider2TabsConfigurationRector.php @@ -45,7 +45,10 @@ return [ CODE_SAMPLE )]); } - protected function refactorCtrl(\PhpParser\Node\Expr\Array_ $ctrl) : void + /** + * @param \PhpParser\Node\Expr\Array_ $ctrl + */ + protected function refactorCtrl($ctrl) : void { $nodeToRemove = $this->extractArrayItemByKey($ctrl, 'dividers2tabs'); if (null !== $nodeToRemove) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallConnectDbRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallConnectDbRector.php index 85b1195649f..60f4db35463 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallConnectDbRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallConnectDbRector.php @@ -23,9 +23,9 @@ final class RemoveMethodCallConnectDbRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Utility\\EidUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallLoadTcaRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallLoadTcaRector.php index 7245637dd5d..e9d85629375 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallLoadTcaRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v0/RemoveMethodCallLoadTcaRector.php @@ -23,9 +23,9 @@ final class RemoveMethodCallLoadTcaRector extends \Rector\Core\Rector\AbstractRe return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtilityRector.php index 1ab900c52f4..82fba97bdc3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v0/TypeHandlingServiceToTypeHandlingUtilityRector.php @@ -23,9 +23,9 @@ final class TypeHandlingServiceToTypeHandlingUtilityRector extends \Rector\Core\ return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Service\\TypeHandlingService'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v1/GetTemporaryImageWithTextRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v1/GetTemporaryImageWithTextRector.php index f70ecc0f241..39ce27637f5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v1/GetTemporaryImageWithTextRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v1/GetTemporaryImageWithTextRector.php @@ -23,9 +23,9 @@ final class GetTemporaryImageWithTextRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Resource\\Processing\\LocalImageProcessor'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v4/DropAdditionalPaletteRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v4/DropAdditionalPaletteRector.php index dc6ff17bc01..b12256d676a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v4/DropAdditionalPaletteRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v4/DropAdditionalPaletteRector.php @@ -55,7 +55,11 @@ return [ CODE_SAMPLE )]); } - protected function refactorType(\PhpParser\Node\Expr $typeKey, \PhpParser\Node\Expr $typeConfig) : void + /** + * @param \PhpParser\Node\Expr $typeKey + * @param \PhpParser\Node\Expr $typeConfig + */ + protected function refactorType($typeKey, $typeConfig) : void { if (!$typeConfig instanceof \PhpParser\Node\Expr\Array_) { return; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v4/InstantiatePageRendererExplicitlyRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v4/InstantiatePageRendererExplicitlyRector.php index 06f3dfcac4c..78fe6de23e2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v4/InstantiatePageRendererExplicitlyRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v4/InstantiatePageRendererExplicitlyRector.php @@ -32,9 +32,9 @@ final class InstantiatePageRendererExplicitlyRector extends \Rector\Core\Rector\ return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v4/MethodReadLLFileToLocalizationFactoryRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v4/MethodReadLLFileToLocalizationFactoryRector.php index 9fd28ebddf7..f624e3bfa67 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v4/MethodReadLLFileToLocalizationFactoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v4/MethodReadLLFileToLocalizationFactoryRector.php @@ -23,9 +23,9 @@ final class MethodReadLLFileToLocalizationFactoryRector extends \Rector\Core\Rec return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtensionRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtensionRector.php index edc54a460cb..2c198305dbe 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtensionRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v4/MoveLanguageFilesFromRemovedCmsExtensionRector.php @@ -43,9 +43,9 @@ CODE_SAMPLE return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $value = $this->valueResolver->getValue($node); if (null === $value || !\is_string($value)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v5/RemoveIconsInOptionTagsRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v5/RemoveIconsInOptionTagsRector.php index f330066dfe8..edafaa12721 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v5/RemoveIconsInOptionTagsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v5/RemoveIconsInOptionTagsRector.php @@ -50,7 +50,11 @@ return [ CODE_SAMPLE )]); } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { $config = $this->extractSubArrayByKey($columnTca, self::CONFIG); if (!$config instanceof \PhpParser\Node\Expr\Array_) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v5/UseExtPrefixForTcaIconFileRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v5/UseExtPrefixForTcaIconFileRector.php index b67b2bcffbb..9be6ba24480 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v5/UseExtPrefixForTcaIconFileRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v5/UseExtPrefixForTcaIconFileRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v6/AddRenderTypeToSelectFieldRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v6/AddRenderTypeToSelectFieldRector.php index 7241ad79bb8..9beb9a54382 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v6/AddRenderTypeToSelectFieldRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v6/AddRenderTypeToSelectFieldRector.php @@ -56,7 +56,11 @@ return [ CODE_SAMPLE )]); } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { $config = $this->extractSubArrayByKey($columnTca, self::CONFIG); if (!$config instanceof \PhpParser\Node\Expr\Array_) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editorRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editorRector.php index 039f5866383..809f4ee50b1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editorRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v6/MigrateT3editorWizardToRenderTypeT3editorRector.php @@ -79,9 +79,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v6/RemoveIconOptionForRenderTypeSelectRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v6/RemoveIconOptionForRenderTypeSelectRector.php index 99b823c3bd0..b47a57597c6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v6/RemoveIconOptionForRenderTypeSelectRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v6/RemoveIconOptionForRenderTypeSelectRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v6/RenamePiListBrowserResultsRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v6/RenamePiListBrowserResultsRector.php index d45fcd77a24..b0b7aba7bf1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v6/RenamePiListBrowserResultsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v6/RenamePiListBrowserResultsRector.php @@ -26,9 +26,9 @@ final class RenamePiListBrowserResultsRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\IndexedSearch\\Controller\\SearchFormController'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v7/v6/WrapClickMenuOnIconRector.php b/vendor/ssch/typo3-rector/src/Rector/v7/v6/WrapClickMenuOnIconRector.php index 9ea6008769e..3569425ee8c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v7/v6/WrapClickMenuOnIconRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v7/v6/WrapClickMenuOnIconRector.php @@ -23,9 +23,9 @@ final class WrapClickMenuOnIconRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/ChangeMethodCallsForStandaloneViewRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/ChangeMethodCallsForStandaloneViewRector.php index 798170c82a3..3ae8aff0a3c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/ChangeMethodCallsForStandaloneViewRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/ChangeMethodCallsForStandaloneViewRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { foreach (self::OLD_TO_NEW_METHODS_BY_CLASS as $type => $oldToNewMethods) { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType($type))) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArgumentsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArgumentsRector.php index 3f8d4095e41..9b10f7ebb55 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArgumentsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetFileAbsFileNameRemoveDeprecatedArgumentsRector.php @@ -23,9 +23,9 @@ final class GetFileAbsFileNameRemoveDeprecatedArgumentsRector extends \Rector\Co return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetPreferredClientLanguageRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetPreferredClientLanguageRector.php index dda302454c7..ed2aea08196 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetPreferredClientLanguageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/GetPreferredClientLanguageRector.php @@ -28,9 +28,9 @@ final class GetPreferredClientLanguageRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isCharsetConverterMethodCall($node) && !$this->isCallFromTypoScriptFrontendController($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileNameRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileNameRector.php index 6a7dd023cd4..7487918fe3e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileNameRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/PrependAbsolutePathToGetFileAbsFileNameRector.php @@ -24,9 +24,9 @@ final class PrependAbsolutePathToGetFileAbsFileNameRector extends \Rector\Core\R return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Imaging\\GraphicalFunctions'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RandomMethodsToRandomClassRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RandomMethodsToRandomClassRector.php index 39f725856bd..66e48b07e17 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RandomMethodsToRandomClassRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RandomMethodsToRandomClassRector.php @@ -27,9 +27,9 @@ final class RandomMethodsToRandomClassRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMarkerMethodsFromHtmlParserRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMarkerMethodsFromHtmlParserRector.php index ae8cb0fb4bc..4cd344cd562 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMarkerMethodsFromHtmlParserRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMarkerMethodsFromHtmlParserRector.php @@ -39,9 +39,9 @@ final class RefactorRemovedMarkerMethodsFromHtmlParserRector extends \Rector\Cor return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Html\\HtmlParser'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRendererRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRendererRector.php index d1eda504428..667b092cef1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRendererRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromContentObjectRendererRector.php @@ -36,9 +36,9 @@ final class RefactorRemovedMethodsFromContentObjectRendererRector extends \Recto return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtilityRector.php index 8a9ed620681..3d9e3a5b889 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RefactorRemovedMethodsFromGeneralUtilityRector.php @@ -30,9 +30,9 @@ final class RefactorRemovedMethodsFromGeneralUtilityRector extends \Rector\Core\ return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node->class, 'TYPO3\\CMS\\Core\\Utility\\GeneralUtility')) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveCharsetConverterParametersRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveCharsetConverterParametersRector.php index b9465a8c153..16a535c7d85 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveCharsetConverterParametersRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveCharsetConverterParametersRector.php @@ -23,9 +23,9 @@ final class RemoveCharsetConverterParametersRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Charset\\CharsetConverter'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveLangCsConvObjAndParserFactoryRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveLangCsConvObjAndParserFactoryRector.php index f9e2b345ca2..25aeec25bf0 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveLangCsConvObjAndParserFactoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveLangCsConvObjAndParserFactoryRector.php @@ -34,9 +34,9 @@ final class RemoveLangCsConvObjAndParserFactoryRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param MethodCall|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemovePropertyUserAuthenticationRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemovePropertyUserAuthenticationRector.php index fb1531ebd8e..ce343281c96 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemovePropertyUserAuthenticationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemovePropertyUserAuthenticationRector.php @@ -23,9 +23,9 @@ final class RemovePropertyUserAuthenticationRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isName($node, 'userAuthentication')) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveRteHtmlParserEvalWriteFileRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveRteHtmlParserEvalWriteFileRector.php index 9dcba1cde48..27ed5d413a3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveRteHtmlParserEvalWriteFileRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveRteHtmlParserEvalWriteFileRector.php @@ -26,9 +26,9 @@ final class RemoveRteHtmlParserEvalWriteFileRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Html\\RteHtmlParser'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveWakeupCallFromEntityRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveWakeupCallFromEntityRector.php index a5e497d96e6..3cb364c6db2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveWakeupCallFromEntityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RemoveWakeupCallFromEntityRector.php @@ -24,9 +24,9 @@ final class RemoveWakeupCallFromEntityRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\DomainObject\\AbstractDomainObject'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RenderCharsetDefaultsToUtf8Rector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RenderCharsetDefaultsToUtf8Rector.php index 1699678e346..c5808b6bddb 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RenderCharsetDefaultsToUtf8Rector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RenderCharsetDefaultsToUtf8Rector.php @@ -35,9 +35,9 @@ final class RenderCharsetDefaultsToUtf8Rector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RequireMethodsToNativeFunctionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RequireMethodsToNativeFunctionsRector.php index 0bf56d004e3..e994d004086 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RequireMethodsToNativeFunctionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RequireMethodsToNativeFunctionsRector.php @@ -24,9 +24,9 @@ final class RequireMethodsToNativeFunctionsRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RteHtmlParserRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RteHtmlParserRector.php index 310c17b7e8e..86bb7d8ef35 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/RteHtmlParserRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/RteHtmlParserRector.php @@ -24,9 +24,9 @@ final class RteHtmlParserRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerGlobalsToSingletonRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerGlobalsToSingletonRector.php index 2d1f818d495..79f9abdd795 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerGlobalsToSingletonRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerGlobalsToSingletonRector.php @@ -31,9 +31,9 @@ final class TimeTrackerGlobalsToSingletonRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->typo3NodeResolver->isAnyMethodCallOnGlobals($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TIME_TRACKER)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php index 166de6707f1..1f093531539 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v0/TimeTrackerInsteadOfNullTimeTrackerRector.php @@ -26,9 +26,9 @@ final class TimeTrackerInsteadOfNullTimeTrackerRector extends \Rector\Core\Recto return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\New_::class]; } /** - * @param MethodCall|StaticCall|New_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\New_) { return $this->renameClassIfNeeded($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v1/Array2XmlCsToArray2XmlRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v1/Array2XmlCsToArray2XmlRector.php index ebf3786cce3..63a4701349b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v1/Array2XmlCsToArray2XmlRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v1/Array2XmlCsToArray2XmlRector.php @@ -28,9 +28,9 @@ final class Array2XmlCsToArray2XmlRector extends \Rector\Core\Rector\AbstractRec return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v1/GeneralUtilityToUpperAndLowerRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v1/GeneralUtilityToUpperAndLowerRector.php index 08a49cb1628..7a295a50df6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v1/GeneralUtilityToUpperAndLowerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v1/GeneralUtilityToUpperAndLowerRector.php @@ -23,9 +23,9 @@ final class GeneralUtilityToUpperAndLowerRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorDbConstantsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorDbConstantsRector.php index f7502553233..6b6c099b229 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorDbConstantsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorDbConstantsRector.php @@ -29,9 +29,9 @@ final class RefactorDbConstantsRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $constantsName = $this->getName($node); if (null === $constantsName) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorVariousGeneralUtilityMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorVariousGeneralUtilityMethodsRector.php index 9585eddd9a2..82e3ec5257e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorVariousGeneralUtilityMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v1/RefactorVariousGeneralUtilityMethodsRector.php @@ -62,9 +62,9 @@ final class RefactorVariousGeneralUtilityMethodsRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverterRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverterRector.php index a6c614a5826..fa98b7eb6dd 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverterRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v1/TypoScriptFrontendControllerCharsetConverterRector.php @@ -43,9 +43,9 @@ final class TypoScriptFrontendControllerCharsetConverterRector extends \Rector\C return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslationRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslationRector.php index a143a3f9c0d..e2701ca6cbd 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v2/UseHtmlSpecialCharsDirectlyForTranslationRector.php @@ -67,9 +67,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorMethodFileContentRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorMethodFileContentRector.php index bfbe6dcb21a..ecbbb8dea0d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorMethodFileContentRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorMethodFileContentRector.php @@ -34,9 +34,9 @@ final class RefactorMethodFileContentRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorQueryViewTableWrapRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorQueryViewTableWrapRector.php index 2015364fdcc..0b3c563597c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorQueryViewTableWrapRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RefactorQueryViewTableWrapRector.php @@ -26,9 +26,9 @@ final class RefactorQueryViewTableWrapRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Database\\QueryView'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RemovedTcaSelectTreeOptionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RemovedTcaSelectTreeOptionsRector.php index c2bb4a28ea2..2fcc52c0da0 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v3/RemovedTcaSelectTreeOptionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v3/RemovedTcaSelectTreeOptionsRector.php @@ -73,9 +73,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v3/SoftReferencesFunctionalityRemovedRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v3/SoftReferencesFunctionalityRemovedRector.php index d2283ba5401..52792be739d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v3/SoftReferencesFunctionalityRemovedRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v3/SoftReferencesFunctionalityRemovedRector.php @@ -28,9 +28,9 @@ final class SoftReferencesFunctionalityRemovedRector extends \Rector\Core\Rector return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v4/ExtensionManagementUtilityExtRelPathRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v4/ExtensionManagementUtilityExtRelPathRector.php index 31510418d0e..cd2c920458c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v4/ExtensionManagementUtilityExtRelPathRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v4/ExtensionManagementUtilityExtRelPathRector.php @@ -24,9 +24,9 @@ final class ExtensionManagementUtilityExtRelPathRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v4/RemoveOptionShowIfRteRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v4/RemoveOptionShowIfRteRector.php index 60f4fc769b6..d0b37935f4b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v4/RemoveOptionShowIfRteRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v4/RemoveOptionShowIfRteRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v4/SubstituteOldWizardIconsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v4/SubstituteOldWizardIconsRector.php index d4f3590326f..fe6e29def54 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v4/SubstituteOldWizardIconsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v4/SubstituteOldWizardIconsRector.php @@ -80,9 +80,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; @@ -162,7 +162,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $oldToNewFileLocations = $configuration[self::OLD_TO_NEW_FILE_LOCATIONS] ?? $configuration; \RectorPrefix20211210\Webmozart\Assert\Assert::isArray($oldToNewFileLocations); diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v5/CharsetConverterToMultiByteFunctionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v5/CharsetConverterToMultiByteFunctionsRector.php index 2fc58a439fc..9f3c910eba1 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v5/CharsetConverterToMultiByteFunctionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v5/CharsetConverterToMultiByteFunctionsRector.php @@ -26,9 +26,9 @@ final class CharsetConverterToMultiByteFunctionsRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v5/ContentObjectRendererFileResourceRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v5/ContentObjectRendererFileResourceRector.php index 2d8b344b900..9dbaccbae7f 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v5/ContentObjectRendererFileResourceRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v5/ContentObjectRendererFileResourceRector.php @@ -46,9 +46,9 @@ final class ContentObjectRendererFileResourceRector extends \Rector\Core\Rector\ return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v5/MoveLanguageFilesFromLocallangToResourcesRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v5/MoveLanguageFilesFromLocallangToResourcesRector.php index 3bc11dbae22..858f6326a07 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v5/MoveLanguageFilesFromLocallangToResourcesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v5/MoveLanguageFilesFromLocallangToResourcesRector.php @@ -26,9 +26,9 @@ final class MoveLanguageFilesFromLocallangToResourcesRector extends \Rector\Core return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $value = $this->valueResolver->getValue($node); foreach (self::MAPPING_OLD_TO_NEW_PATHS as $oldPath => $newPath) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveOptionVersioningFollowPagesRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveOptionVersioningFollowPagesRector.php index 0b8ad3b35f0..80ea0b5902d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveOptionVersioningFollowPagesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveOptionVersioningFollowPagesRector.php @@ -52,9 +52,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveSupportForTransForeignTableRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveSupportForTransForeignTableRector.php index 407b8946547..ed46e2ed368 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveSupportForTransForeignTableRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v5/RemoveSupportForTransForeignTableRector.php @@ -26,9 +26,9 @@ final class RemoveSupportForTransForeignTableRector extends \Rector\Core\Rector\ return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/AddTypeToColumnConfigRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/AddTypeToColumnConfigRector.php index 558a10c197d..85f3144a73f 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/AddTypeToColumnConfigRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/AddTypeToColumnConfigRector.php @@ -49,7 +49,7 @@ CODE_SAMPLE * @param Expr $columnName the key in above example (typically String_('column_name')) * @param Expr $columnTca the value in above example (typically an associative Array with stuff like 'label', 'config', 'exclude', ...) */ - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + protected function refactorColumn($columnName, $columnTca) : void { if (!$columnTca instanceof \PhpParser\Node\Expr\Array_) { return; @@ -79,8 +79,9 @@ CODE_SAMPLE * won't contain a 'type' field. * * @inheritdoc + * @param \PhpParser\Node\Expr\ArrayItem $arrayItem */ - protected function isSingleTcaColumn(\PhpParser\Node\Expr\ArrayItem $arrayItem) : bool + protected function isSingleTcaColumn($arrayItem) : bool { $labelNode = $this->extractArrayItemByKey($arrayItem->value, 'label'); return null !== $labelNode; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/ArrayUtilityInArrayToFuncInArrayRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/ArrayUtilityInArrayToFuncInArrayRector.php index e8c4f4d862f..a92d9e4210c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/ArrayUtilityInArrayToFuncInArrayRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/ArrayUtilityInArrayToFuncInArrayRector.php @@ -23,9 +23,9 @@ final class ArrayUtilityInArrayToFuncInArrayRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\ArrayUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateLastPiecesOfDefaultExtrasRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateLastPiecesOfDefaultExtrasRector.php index 35b0a89aca0..16c780905d8 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateLastPiecesOfDefaultExtrasRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateLastPiecesOfDefaultExtrasRector.php @@ -32,9 +32,9 @@ final class MigrateLastPiecesOfDefaultExtrasRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateOptionsOfTypeGroupRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateOptionsOfTypeGroupRector.php index a220481d5fa..c8c788f60d7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateOptionsOfTypeGroupRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateOptionsOfTypeGroupRector.php @@ -40,9 +40,9 @@ final class MigrateOptionsOfTypeGroupRector extends \Rector\Core\Rector\Abstract return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSelectShowIconTableRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSelectShowIconTableRector.php index ea79a73b1b6..7bfd9f1d2f8 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSelectShowIconTableRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSelectShowIconTableRector.php @@ -31,9 +31,9 @@ final class MigrateSelectShowIconTableRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSpecialConfigurationAndRemoveShowItemStylePointerConfigRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSpecialConfigurationAndRemoveShowItemStylePointerConfigRector.php index cdb04b68e42..3ac05c5c5e7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSpecialConfigurationAndRemoveShowItemStylePointerConfigRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MigrateSpecialConfigurationAndRemoveShowItemStylePointerConfigRector.php @@ -71,7 +71,11 @@ CODE_SAMPLE { $this->defaultExtrasFromColumns = []; } - protected function refactorColumn(\PhpParser\Node\Expr $columnName, \PhpParser\Node\Expr $columnTca) : void + /** + * @param \PhpParser\Node\Expr $columnName + * @param \PhpParser\Node\Expr $columnTca + */ + protected function refactorColumn($columnName, $columnTca) : void { if (!$columnTca instanceof \PhpParser\Node\Expr\Array_) { return; @@ -82,7 +86,11 @@ CODE_SAMPLE } $this->defaultExtrasFromColumns[$this->valueResolver->getValue($columnName)] = $this->valueResolver->getValue($defaultExtras); } - protected function refactorType(\PhpParser\Node\Expr $typeKey, \PhpParser\Node\Expr $typeConfiguration) : void + /** + * @param \PhpParser\Node\Expr $typeKey + * @param \PhpParser\Node\Expr $typeConfiguration + */ + protected function refactorType($typeKey, $typeConfiguration) : void { if (!$typeConfiguration instanceof \PhpParser\Node\Expr\Array_) { return; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumnsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumnsRector.php index 37ced8e16ba..5dd7ebf24a5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumnsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveRequestUpdateOptionFromControlToColumnsRector.php @@ -56,9 +56,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveTypeGroupSuggestWizardToSuggestOptionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveTypeGroupSuggestWizardToSuggestOptionsRector.php index b0b95c464eb..aff5c9f64ab 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveTypeGroupSuggestWizardToSuggestOptionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/MoveTypeGroupSuggestWizardToSuggestOptionsRector.php @@ -86,9 +86,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RefactorTCARector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RefactorTCARector.php index d8e12fa5593..d68bb86a362 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RefactorTCARector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RefactorTCARector.php @@ -96,9 +96,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RemoveL10nModeNoCopyRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RemoveL10nModeNoCopyRector.php index 5312bb4c6dd..92c4653e9a9 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RemoveL10nModeNoCopyRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RemoveL10nModeNoCopyRector.php @@ -36,9 +36,9 @@ final class RemoveL10nModeNoCopyRector extends \Rector\Core\Rector\AbstractRecto return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtextRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtextRector.php index 8a1a7d708b2..6944fa3e09e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtextRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v6/RichtextFromDefaultExtrasToEnableRichtextRector.php @@ -62,9 +62,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $this->hasAstBeenChanged = \false; if (!$this->isFullTca($node)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordRawRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordRawRector.php index 98eb774ecaf..d7de8e7d165 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordRawRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordRawRector.php @@ -33,9 +33,9 @@ final class BackendUtilityGetRecordRawRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilderRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilderRector.php index 7622cb4f631..3d87a3c1eea 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilderRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/BackendUtilityGetRecordsByFieldToQueryBuilderRector.php @@ -45,9 +45,9 @@ final class BackendUtilityGetRecordsByFieldToQueryBuilderRector extends \Rector\ return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/ChangeAttemptsParameterConsoleOutputRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/ChangeAttemptsParameterConsoleOutputRector.php index 66e360be5f3..24bdb9cff17 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/ChangeAttemptsParameterConsoleOutputRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/ChangeAttemptsParameterConsoleOutputRector.php @@ -31,9 +31,9 @@ final class ChangeAttemptsParameterConsoleOutputRector extends \Rector\Core\Rect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Mvc\\Cli\\ConsoleOutput'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerRmCommaRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerRmCommaRector.php index 7694bd3484f..c6c7025e8ad 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerRmCommaRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerRmCommaRector.php @@ -24,9 +24,9 @@ final class DataHandlerRmCommaRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArgumentsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArgumentsRector.php index cded8a51a36..4aca26a9a1d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArgumentsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/DataHandlerVariousMethodsAndMethodArgumentsRector.php @@ -28,9 +28,9 @@ final class DataHandlerVariousMethodsAndMethodArgumentsRector extends \Rector\Co return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/MoveForeignTypesToOverrideChildTcaRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/MoveForeignTypesToOverrideChildTcaRector.php index 55097e503d8..6fcf7ce04c4 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/MoveForeignTypesToOverrideChildTcaRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/MoveForeignTypesToOverrideChildTcaRector.php @@ -91,10 +91,10 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node * @return ?Return_ */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorArrayBrowserWrapValueRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorArrayBrowserWrapValueRector.php index b503fdd8707..3b1f9baaba6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorArrayBrowserWrapValueRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorArrayBrowserWrapValueRector.php @@ -24,9 +24,9 @@ final class RefactorArrayBrowserWrapValueRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Lowlevel\\Utility\\ArrayBrowser'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector.php index 1cc4b8cb472..2b7cefa19ad 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector.php @@ -52,9 +52,9 @@ final class RefactorGraphicalFunctionsTempPathAndCreateTemSubDirRector extends \ return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param MethodCall|PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\MethodCall) { return $this->refactorMethodCall($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorPrintContentMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorPrintContentMethodsRector.php index df12a26a391..9a3e506bc2c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorPrintContentMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorPrintContentMethodsRector.php @@ -26,9 +26,9 @@ final class RefactorPrintContentMethodsRector extends \Rector\Core\Rector\Abstra return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRendererRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRendererRector.php index a02fbb93dfe..be31e63a25b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRendererRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RefactorRemovedMarkerMethodsFromContentObjectRendererRector.php @@ -31,9 +31,9 @@ final class RefactorRemovedMarkerMethodsFromContentObjectRendererRector extends return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFieldsRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFieldsRector.php index c7c08547ec4..88373d5e05e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFieldsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveConfigMaxFromInputDateTimeFieldsRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveLocalizationModeKeepIfNeededRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveLocalizationModeKeepIfNeededRector.php index 35f96d26970..d4143df1103 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveLocalizationModeKeepIfNeededRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/RemoveLocalizationModeKeepIfNeededRector.php @@ -72,9 +72,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/TemplateServiceSplitConfArrayRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/TemplateServiceSplitConfArrayRector.php index b6ccc186936..1a302e067dd 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/TemplateServiceSplitConfArrayRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/TemplateServiceSplitConfArrayRector.php @@ -24,9 +24,9 @@ final class TemplateServiceSplitConfArrayRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\TypoScript\\TemplateService'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHashRector.php b/vendor/ssch/typo3-rector/src/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHashRector.php index 9f2aa6a1ee5..64dd8d8c0ec 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHashRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v8/v7/UseCachingFrameworkInsteadGetAndStoreHashRector.php @@ -53,9 +53,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionInfoRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionInfoRector.php index 16eae708767..3d32aff3847 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionInfoRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionInfoRector.php @@ -25,9 +25,9 @@ final class CheckForExtensionInfoRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isExtensionManagementUtilityIsLoaded($node) && !$this->isPackageManagerIsActivePackage($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionVersionRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionVersionRector.php index 35ef7102a98..8298931cbf7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionVersionRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/CheckForExtensionVersionRector.php @@ -25,9 +25,9 @@ final class CheckForExtensionVersionRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\StaticCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isExtensionManagementUtilityIsLoaded($node) && !$this->isPackageManagerIsActivePackage($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php index 3e01114812f..6fbf3777ab5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/DatabaseConnectionToDbalRector.php @@ -41,9 +41,9 @@ final class DatabaseConnectionToDbalRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/FindByPidsAndAuthorIdRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/FindByPidsAndAuthorIdRector.php index fdbfdfd6a7b..a3caa0baed7 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/FindByPidsAndAuthorIdRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/FindByPidsAndAuthorIdRector.php @@ -24,9 +24,9 @@ final class FindByPidsAndAuthorIdRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\SysNote\\Domain\\Repository\\SysNoteRepository'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/GeneratePageTitleRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/GeneratePageTitleRector.php index e4fb6535fa6..c4123077d27 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/GeneratePageTitleRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/GeneratePageTitleRector.php @@ -27,9 +27,9 @@ final class GeneratePageTitleRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Page\\PageGenerator'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/IgnoreValidationAnnotationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/IgnoreValidationAnnotationRector.php index ebdfb4bb85f..4d22870c22e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/IgnoreValidationAnnotationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/IgnoreValidationAnnotationRector.php @@ -48,9 +48,9 @@ final class IgnoreValidationAnnotationRector extends \Rector\Core\Rector\Abstrac return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); if (!$phpDocInfo->hasByNames([self::OLD_ANNOTATION, self::VERY_OLD_ANNOTATION])) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/InjectAnnotationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/InjectAnnotationRector.php index d72a82fd464..8b3c551539c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/InjectAnnotationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/InjectAnnotationRector.php @@ -57,9 +57,9 @@ final class InjectAnnotationRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $injectMethods = []; $properties = $node->getProperties(); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/MetaTagManagementRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/MetaTagManagementRector.php index 90f71ae3773..cb5fdb5e148 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/MetaTagManagementRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/MetaTagManagementRector.php @@ -41,9 +41,9 @@ final class MetaTagManagementRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethodRector.php index 0dc818b54c0..b410a3a355b 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/MoveRenderArgumentsToInitializeArgumentsMethodRector.php @@ -45,9 +45,9 @@ final class MoveRenderArgumentsToInitializeArgumentsMethodRector extends \Rector return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->isAbstract()) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/QueryLogicalOrAndLogicalAndToArrayParameterRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/QueryLogicalOrAndLogicalAndToArrayParameterRector.php index 662f3ddc523..8d648079ad8 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/QueryLogicalOrAndLogicalAndToArrayParameterRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/QueryLogicalOrAndLogicalAndToArrayParameterRector.php @@ -24,9 +24,9 @@ final class QueryLogicalOrAndLogicalAndToArrayParameterRector extends \Rector\Co return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfigRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfigRector.php index ae46bdf778b..2e49d35ea5a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfigRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorBackendUtilityGetPagesTSconfigRector.php @@ -25,9 +25,9 @@ final class RefactorBackendUtilityGetPagesTSconfigRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorDeprecationLogRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorDeprecationLogRector.php index f587d603473..f37c9b7b7aa 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorDeprecationLogRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorDeprecationLogRector.php @@ -31,9 +31,9 @@ final class RefactorDeprecationLogRector extends \Rector\Core\Rector\AbstractRec return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $className = $this->getName($node->class); if ('TYPO3\\CMS\\Core\\Utility\\GeneralUtility' !== $className) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtilityRector.php index b4f01b4bed4..b33f30c5fe5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RefactorMethodsFromExtensionManagementUtilityRector.php @@ -23,9 +23,9 @@ final class RefactorMethodsFromExtensionManagementUtilityRector extends \Rector\ return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $className = $this->getName($node->class); $methodName = $this->getName($node->name); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveMethodInitTCARector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveMethodInitTCARector.php index 15c478894f7..3418b1ccce4 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveMethodInitTCARector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveMethodInitTCARector.php @@ -23,9 +23,9 @@ final class RemoveMethodInitTCARector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Utility\\EidUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalizationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalizationRector.php index 5667fae2814..eb094a1ac7e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalizationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveOptionLocalizeChildrenAtParentLocalizationRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerControllerRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerControllerRector.php index 61f47b0d846..7bfa2fbe603 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerControllerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemovePropertiesFromSimpleDataHandlerControllerRector.php @@ -26,9 +26,9 @@ final class RemovePropertiesFromSimpleDataHandlerControllerRector extends \Recto return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node->var instanceof \PhpParser\Node\Expr\Variable) { $this->removeVariableNode($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeepRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeepRector.php index f6a7dff1e9f..5619ca20c55 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeepRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/RemoveSecondArgumentGeneralUtilityMkdirDeepRector.php @@ -24,9 +24,9 @@ final class RemoveSecondArgumentGeneralUtilityMkdirDeepRector extends \Rector\Co return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceAnnotationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceAnnotationRector.php index 297438edb88..1d2be7206aa 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceAnnotationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceAnnotationRector.php @@ -50,9 +50,9 @@ final class ReplaceAnnotationRector extends \Rector\Core\Rector\AbstractRector i return [\PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param Property|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); $annotationChanged = \false; @@ -96,7 +96,7 @@ CODE_SAMPLE /** * @param mixed[] $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $this->oldToNewAnnotations = $configuration[self::OLD_TO_NEW_ANNOTATIONS] ?? $configuration; } diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceExtKeyWithExtensionKeyRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceExtKeyWithExtensionKeyRector.php index 84189ab6082..31b81849095 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceExtKeyWithExtensionKeyRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplaceExtKeyWithExtensionKeyRector.php @@ -63,9 +63,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\Variable::class]; } /** - * @param Variable $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $fileInfo = $this->file->getSmartFileInfo(); if ($this->filesFinder->isExtEmconf($fileInfo)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplacedGeneralUtilitySysLogWithLogginApiRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplacedGeneralUtilitySysLogWithLogginApiRector.php index 4a50e7dba19..6891434f20a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplacedGeneralUtilitySysLogWithLogginApiRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/ReplacedGeneralUtilitySysLogWithLogginApiRector.php @@ -34,9 +34,9 @@ final class ReplacedGeneralUtilitySysLogWithLogginApiRector extends \Rector\Core return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteCacheWrapperMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteCacheWrapperMethodsRector.php index 83e360a836f..7c6a1069b46 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteCacheWrapperMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteCacheWrapperMethodsRector.php @@ -45,9 +45,9 @@ final class SubstituteCacheWrapperMethodsRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteConstantParsetimeStartRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteConstantParsetimeStartRector.php index 00851cadb7f..7e019255c61 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteConstantParsetimeStartRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteConstantParsetimeStartRector.php @@ -36,9 +36,9 @@ final class SubstituteConstantParsetimeStartRector extends \Rector\Core\Rector\A return [\PhpParser\Node\Expr::class]; } /** - * @param Expr $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->typo3NodeResolver->isTypo3Global($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::PARSETIME_START)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteGeneralUtilityDevLogRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteGeneralUtilityDevLogRector.php index 89be81c19ad..2a10646d845 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteGeneralUtilityDevLogRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/SubstituteGeneralUtilityDevLogRector.php @@ -34,9 +34,9 @@ final class SubstituteGeneralUtilityDevLogRector extends \Rector\Core\Rector\Abs return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseExtensionConfigurationApiRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseExtensionConfigurationApiRector.php index 07ace7f8d62..c245770a71d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseExtensionConfigurationApiRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseExtensionConfigurationApiRector.php @@ -40,9 +40,9 @@ final class UseExtensionConfigurationApiRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\FuncCall::class, \PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param FuncCall|ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\FuncCall && !$this->isName($node->name, 'unserialize')) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseLogMethodInsteadOfNewLog2Rector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseLogMethodInsteadOfNewLog2Rector.php index 440b792bda0..7516977e1ac 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseLogMethodInsteadOfNewLog2Rector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseLogMethodInsteadOfNewLog2Rector.php @@ -36,9 +36,9 @@ final class UseLogMethodInsteadOfNewLog2Rector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\DataHandling\\DataHandler'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseNewComponentIdForPageTreeRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseNewComponentIdForPageTreeRector.php index a57288e7a66..6da856a3df9 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseNewComponentIdForPageTreeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseNewComponentIdForPageTreeRector.php @@ -26,9 +26,9 @@ final class UseNewComponentIdForPageTreeRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseRenderingContextGetControllerContextRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseRenderingContextGetControllerContextRector.php index 0377b469986..41d8d9b7c34 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseRenderingContextGetControllerContextRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v0/UseRenderingContextGetControllerContextRector.php @@ -26,9 +26,9 @@ final class UseRenderingContextGetControllerContextRector extends \Rector\Core\R return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $desiredObjectTypes = [new \PHPStan\Type\ObjectType('TYPO3Fluid\\Fluid\\Core\\ViewHelper\\AbstractViewHelper'), new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractViewHelper')]; if (!$this->nodeTypeResolver->isObjectTypes($node, $desiredObjectTypes)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v2/GeneralUtilityGetUrlRequestHeadersRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v2/GeneralUtilityGetUrlRequestHeadersRector.php index e4fe30d5157..7aa16cd8316 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v2/GeneralUtilityGetUrlRequestHeadersRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v2/GeneralUtilityGetUrlRequestHeadersRector.php @@ -36,9 +36,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\GeneralUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v2/PageNotFoundAndErrorHandlingRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v2/PageNotFoundAndErrorHandlingRector.php index 3756e4a300e..c909fa58115 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v2/PageNotFoundAndErrorHandlingRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v2/PageNotFoundAndErrorHandlingRector.php @@ -87,9 +87,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCallRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCallRector.php index b7cd7406210..74386c74a6e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCallRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v2/RenameMethodCallToEnvironmentMethodCallRector.php @@ -39,9 +39,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $className = $this->getName($node->class); $methodName = $this->getName($node->name); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUserAuthenticationSimplelogRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUserAuthenticationSimplelogRector.php index 591a1b8aaab..cf9c74fb49a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUserAuthenticationSimplelogRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUserAuthenticationSimplelogRector.php @@ -18,9 +18,9 @@ use RectorPrefix20211210\TYPO3\CMS\Core\Authentication\BackendUserAuthentication final class BackendUserAuthenticationSimplelogRector extends \Rector\Core\Rector\AbstractRector { /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUtilityGetModuleUrlRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUtilityGetModuleUrlRector.php index 29b1145753d..52a91a2389d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUtilityGetModuleUrlRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/BackendUtilityGetModuleUrlRector.php @@ -18,9 +18,9 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; final class BackendUtilityGetModuleUrlRector extends \Rector\Core\Rector\AbstractRector { /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/CopyMethodGetPidForModTSconfigRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/CopyMethodGetPidForModTSconfigRector.php index dd38081788a..e4587fee21e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/CopyMethodGetPidForModTSconfigRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/CopyMethodGetPidForModTSconfigRector.php @@ -29,9 +29,9 @@ final class CopyMethodGetPidForModTSconfigRector extends \Rector\Core\Rector\Abs return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/MoveLanguageFilesFromExtensionLangRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/MoveLanguageFilesFromExtensionLangRector.php index e7981ae581b..3aad951ab72 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/MoveLanguageFilesFromExtensionLangRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/MoveLanguageFilesFromExtensionLangRector.php @@ -26,9 +26,9 @@ final class MoveLanguageFilesFromExtensionLangRector extends \Rector\Core\Rector return [\PhpParser\Node\Scalar\String_::class]; } /** - * @param String_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $value = $this->valueResolver->getValue($node); if (null === $value || !\is_string($value)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/PhpOptionsUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/PhpOptionsUtilityRector.php index c25944fa057..421f941736c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/PhpOptionsUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/PhpOptionsUtilityRector.php @@ -28,9 +28,9 @@ final class PhpOptionsUtilityRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Utility\\PhpOptionsUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector.php index 36ff332791f..bdec73074f3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector.php @@ -32,9 +32,9 @@ final class PropertyUserTsToMethodGetTsConfigOfBackendUserAuthenticationRector e return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/RefactorTsConfigRelatedMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/RefactorTsConfigRelatedMethodsRector.php index a68e85d866d..05f77e024e2 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/RefactorTsConfigRelatedMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/RefactorTsConfigRelatedMethodsRector.php @@ -58,9 +58,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/RemoveColPosParameterRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/RemoveColPosParameterRector.php index 73343b5b536..86d59157e75 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/RemoveColPosParameterRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/RemoveColPosParameterRector.php @@ -24,9 +24,9 @@ final class RemoveColPosParameterRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Domain\\Repository\\Localization\\LocalizationRepository'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPageRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPageRector.php index 82f0c5a2ab3..0efdec4c03c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/UseMethodGetPageShortcutDirectlyFromSysPageRector.php @@ -34,9 +34,9 @@ final class UseMethodGetPageShortcutDirectlyFromSysPageRector extends \Rector\Co return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v3/ValidateAnnotationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v3/ValidateAnnotationRector.php index 5185251265e..e78fe6ef6ed 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v3/ValidateAnnotationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v3/ValidateAnnotationRector.php @@ -44,9 +44,9 @@ final class ValidateAnnotationRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Stmt\Property::class, \PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param Property|ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($node); if (!$phpDocInfo->hasByName(self::OLD_ANNOTATION)) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/AdditionalFieldProviderRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/AdditionalFieldProviderRector.php index 04dc0e34e15..d2e7ddae358 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/AdditionalFieldProviderRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/AdditionalFieldProviderRector.php @@ -27,9 +27,9 @@ final class AdditionalFieldProviderRector extends \Rector\Core\Rector\AbstractRe return [\PhpParser\Node\Stmt\Class_::class, \PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param Class_|PropertyFetch|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Stmt\Class_) { return $this->refactorClass($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/BackendUtilityShortcutExistsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/BackendUtilityShortcutExistsRector.php index c9372bf40b3..c308d3f310a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/BackendUtilityShortcutExistsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/BackendUtilityShortcutExistsRector.php @@ -34,9 +34,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\StaticCall::class]; } /** - * @param StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Utility\\BackendUtility'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/CallEnableFieldsFromPageRepositoryRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/CallEnableFieldsFromPageRepositoryRector.php index 25b5cec32a5..31b491f083c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/CallEnableFieldsFromPageRepositoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/CallEnableFieldsFromPageRepositoryRector.php @@ -26,9 +26,9 @@ final class CallEnableFieldsFromPageRepositoryRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/ConstantsToEnvironmentApiCallRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/ConstantsToEnvironmentApiCallRector.php index 62f99f710c9..a22f09d0c5e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/ConstantsToEnvironmentApiCallRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/ConstantsToEnvironmentApiCallRector.php @@ -39,9 +39,9 @@ final class ConstantsToEnvironmentApiCallRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\ConstFetch::class, \PhpParser\Node\Expr\BinaryOp\BitwiseAnd::class]; } /** - * @param ConstFetch|BitwiseAnd $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($node instanceof \PhpParser\Node\Expr\ConstFetch) { return $this->refactorConstants($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/DocumentTemplateAddStyleSheetRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/DocumentTemplateAddStyleSheetRector.php index 1e638195342..b7bb406d64d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/DocumentTemplateAddStyleSheetRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/DocumentTemplateAddStyleSheetRector.php @@ -23,9 +23,9 @@ final class DocumentTemplateAddStyleSheetRector extends \Rector\Core\Rector\Abst return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRendererRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRendererRector.php index 433b9826b37..102636b1b5c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRendererRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorDeprecatedConcatenateMethodsPageRendererRector.php @@ -26,9 +26,9 @@ final class RefactorDeprecatedConcatenateMethodsPageRendererRector extends \Rect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Page\\PageRenderer'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtilityRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtilityRector.php index 59f28f73792..c5e824a957a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtilityRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RefactorExplodeUrl2ArrayFromGeneralUtilityRector.php @@ -26,9 +26,9 @@ final class RefactorExplodeUrl2ArrayFromGeneralUtilityRector extends \Rector\Cor return [\PhpParser\Node\Expr\Assign::class]; } /** - * @param Assign $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$node->expr instanceof \PhpParser\Node\Expr\StaticCall && !$node->expr instanceof \PhpParser\Node\Expr\MethodCall) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodGraphicalFunctionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodGraphicalFunctionsRector.php index 495252c8404..b2b66c86b8e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodGraphicalFunctionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodGraphicalFunctionsRector.php @@ -24,9 +24,9 @@ final class RemoveInitMethodGraphicalFunctionsRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Imaging\\GraphicalFunctions'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodTemplateServiceRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodTemplateServiceRector.php index 57e82d84340..8751b8a3c68 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodTemplateServiceRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitMethodTemplateServiceRector.php @@ -23,9 +23,9 @@ final class RemoveInitMethodTemplateServiceRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\TypoScript\\TemplateService'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitTemplateMethodCallRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitTemplateMethodCallRector.php index 893bdc80840..dbc3ee22181 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitTemplateMethodCallRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveInitTemplateMethodCallRector.php @@ -36,9 +36,9 @@ final class RemoveInitTemplateMethodCallRector extends \Rector\Core\Rector\Abstr return [\PhpParser\Node\Expr\MethodCall::class, \PhpParser\Node\Stmt\Expression::class]; } /** - * @param Expression|MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->typo3NodeResolver->isMethodCallOnGlobals($node, 'initTemplate', \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)) { $this->removeNode($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveMethodsFromEidUtilityAndTsfeRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveMethodsFromEidUtilityAndTsfeRector.php index 4d8d3ec3b0a..7cb373694c3 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveMethodsFromEidUtilityAndTsfeRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/RemoveMethodsFromEidUtilityAndTsfeRector.php @@ -34,9 +34,9 @@ final class RemoveMethodsFromEidUtilityAndTsfeRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\StaticCall::class, \PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall|StaticCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/SystemEnvironmentBuilderConstantsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/SystemEnvironmentBuilderConstantsRector.php index 5a535ac0622..a2b012f7ffd 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/SystemEnvironmentBuilderConstantsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/SystemEnvironmentBuilderConstantsRector.php @@ -28,9 +28,9 @@ final class SystemEnvironmentBuilderConstantsRector extends \Rector\Core\Rector\ return [\PhpParser\Node\Expr\ConstFetch::class]; } /** - * @param ConstFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { $constantsName = $this->getName($node); if (null === $constantsName) { diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizerRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizerRector.php index 00e8da18d0a..3dbe314d8ea 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/TemplateGetFileNameToFilePathSanitizerRector.php @@ -43,9 +43,9 @@ final class TemplateGetFileNameToFilePathSanitizerRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->typo3NodeResolver->isMethodCallOnPropertyOfGlobals($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER, 'tmpl')) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLibRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLibRector.php index 9436ed30e2b..3c2067fb16a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLibRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseAddJsFileInsteadOfLoadJavascriptLibRector.php @@ -23,9 +23,9 @@ final class UseAddJsFileInsteadOfLoadJavascriptLibRector extends \Rector\Core\Re return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Backend\\Template\\ModuleTemplate'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethodsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethodsRector.php index 1fc2f2e61a0..84f71cb9d8a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethodsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseClassSchemaInsteadReflectionServiceMethodsRector.php @@ -88,9 +88,9 @@ CODE_SAMPLE return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiForVersioningWorkspaceIdRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiForVersioningWorkspaceIdRector.php index ce8ec34d7bb..4fe36647e0a 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiForVersioningWorkspaceIdRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiForVersioningWorkspaceIdRector.php @@ -35,9 +35,9 @@ final class UseContextApiForVersioningWorkspaceIdRector extends \Rector\Core\Rec return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiRector.php index 63680910c8a..3006565eb2d 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseContextApiRector.php @@ -39,9 +39,9 @@ final class UseContextApiRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPageRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPageRector.php index aba7c72562f..f4ccbf36261 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPageRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseGetMenuInsteadOfGetFirstWebPageRector.php @@ -40,9 +40,9 @@ final class UseGetMenuInsteadOfGetFirstWebPageRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseLanguageAspectForTsfeLanguagePropertiesRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseLanguageAspectForTsfeLanguagePropertiesRector.php index 05ec2ccbdf0..db8dd121668 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseLanguageAspectForTsfeLanguagePropertiesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseLanguageAspectForTsfeLanguagePropertiesRector.php @@ -38,9 +38,9 @@ final class UseLanguageAspectForTsfeLanguagePropertiesRector extends \Rector\Cor return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethodRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethodRector.php index c8b1b160d6e..0f29ba7d282 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethodRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseRootlineUtilityInsteadOfGetRootlineMethodRector.php @@ -34,9 +34,9 @@ final class UseRootlineUtilityInsteadOfGetRootlineMethodRector extends \Rector\C return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->shouldSkip($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector.php index 163d4c7e85f..69c13c76cae 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector.php @@ -32,9 +32,9 @@ final class UseSignalAfterExtensionInstallInsteadOfHasInstalledExtensionsRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php index 53c5f5b9b67..54e5bd69b28 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v4/UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector.php @@ -32,9 +32,9 @@ final class UseSignalTablesDefinitionIsBeingBuiltSqlExpectedSchemaServiceRector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddArgumentToSymfonyCommandRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddArgumentToSymfonyCommandRector.php index 96c68dd8845..5d27fd21c81 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddArgumentToSymfonyCommandRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddArgumentToSymfonyCommandRector.php @@ -64,9 +64,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ([] === $this->commandInputArguments) { return null; @@ -82,7 +82,7 @@ CODE_SAMPLE /** * @param array $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $commandInputArguments = $configuration[self::INPUT_ARGUMENTS] ?? []; $this->commandInputArguments = $commandInputArguments; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddCommandsToReturnRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddCommandsToReturnRector.php index 767405cae63..f0b8cd89765 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddCommandsToReturnRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommand/AddCommandsToReturnRector.php @@ -51,9 +51,9 @@ CODE_SAMPLE return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ([] === $this->commands) { return null; @@ -75,7 +75,7 @@ CODE_SAMPLE /** * @param array $configuration */ - public function configure(array $configuration) : void + public function configure($configuration) : void { $commandInputArguments = $configuration[self::COMMANDS] ?? []; $this->commands = $commandInputArguments; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommandRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommandRector.php index 19e5ddf4705..d02780c9c68 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommandRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/ExtbaseCommandControllerToSymfonyCommandRector.php @@ -77,9 +77,9 @@ final class ExtbaseCommandControllerToSymfonyCommandRector extends \Rector\Core\ return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\CommandController'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorProcessOutputRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorProcessOutputRector.php index a7736aa21fc..cfa4a0be6b6 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorProcessOutputRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorProcessOutputRector.php @@ -36,9 +36,9 @@ final class RefactorProcessOutputRector extends \Rector\Core\Rector\AbstractRect return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->typo3NodeResolver->isMethodCallOnGlobals($node, 'processOutput', \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)) { $this->refactorToNewMethodCalls($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendControllerRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendControllerRector.php index a1e86021cb6..5642ad18d7c 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendControllerRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorPropertiesOfTypoScriptFrontendControllerRector.php @@ -34,9 +34,9 @@ final class RefactorPropertiesOfTypoScriptFrontendControllerRector extends \Rect return [\PhpParser\Node\Expr\PropertyFetch::class]; } /** - * @param PropertyFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node->var, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController')) && !$this->typo3NodeResolver->isPropertyFetchOnAnyPropertyOfGlobals($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO_SCRIPT_FRONTEND_CONTROLLER)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector.php index e5169936e56..f993736b166 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RefactorTypeInternalTypeFileAndFileReferenceToFalRector.php @@ -39,9 +39,9 @@ final class RefactorTypeInternalTypeFileAndFileReferenceToFalRector extends \Rec return [\PhpParser\Node\Stmt\Return_::class]; } /** - * @param Return_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isFullTca($node)) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveFlushCachesRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveFlushCachesRector.php index bace0f84d44..4e898bb54e5 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveFlushCachesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveFlushCachesRector.php @@ -31,9 +31,9 @@ final class RemoveFlushCachesRector extends \Rector\Core\Rector\AbstractRector return [\PhpParser\Node\Stmt\ClassMethod::class]; } /** - * @param ClassMethod $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { /** @var string $name */ $name = $this->getName($node); diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInitMethodFromPageRepositoryRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInitMethodFromPageRepositoryRector.php index 7332c9a9dd3..122cf342c2e 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInitMethodFromPageRepositoryRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInitMethodFromPageRepositoryRector.php @@ -25,9 +25,9 @@ final class RemoveInitMethodFromPageRepositoryRector extends \Rector\Core\Rector return [\PhpParser\Node\Expr\MethodCall::class]; } /** - * @param MethodCall $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->nodeTypeResolver->isMethodStaticCallOrClassMethodObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Frontend\\Page\\PageRepository'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInternalAnnotationRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInternalAnnotationRector.php index 2e121adb540..70f9f9a9d7f 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInternalAnnotationRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/RemoveInternalAnnotationRector.php @@ -32,9 +32,9 @@ final class RemoveInternalAnnotationRector extends \Rector\Core\Rector\AbstractR return [\PhpParser\Node\Stmt\Class_::class]; } /** - * @param Class_ $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if (!$this->isObjectType($node, new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Extbase\\Mvc\\Controller\\CommandController'))) { return null; diff --git a/vendor/ssch/typo3-rector/src/Rector/v9/v5/UsePackageManagerActivePackagesRector.php b/vendor/ssch/typo3-rector/src/Rector/v9/v5/UsePackageManagerActivePackagesRector.php index 329426b6ff3..d96d94f1263 100644 --- a/vendor/ssch/typo3-rector/src/Rector/v9/v5/UsePackageManagerActivePackagesRector.php +++ b/vendor/ssch/typo3-rector/src/Rector/v9/v5/UsePackageManagerActivePackagesRector.php @@ -31,9 +31,9 @@ final class UsePackageManagerActivePackagesRector extends \Rector\Core\Rector\Ab return [\PhpParser\Node\Expr\ArrayDimFetch::class]; } /** - * @param ArrayDimFetch $node + * @param \PhpParser\Node $node */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node + public function refactor($node) : ?\PhpParser\Node { if ($this->typo3NodeResolver->isTypo3Global($node, \Ssch\TYPO3Rector\Helper\Typo3NodeResolver::TYPO3_LOADED_EXT)) { return $this->nodeFactory->createMethodCall($this->nodeFactory->createStaticCall('TYPO3\\CMS\\Core\\Utility\\GeneralUtility', 'makeInstance', [$this->nodeFactory->createClassConstReference('TYPO3\\CMS\\Core\\Package\\PackageManager')]), 'getActivePackages'); diff --git a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ContextGetAspectDynamicReturnTypeExtension.php b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ContextGetAspectDynamicReturnTypeExtension.php index 0d80535442b..32c2b75338f 100644 --- a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ContextGetAspectDynamicReturnTypeExtension.php +++ b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ContextGetAspectDynamicReturnTypeExtension.php @@ -17,11 +17,19 @@ final class ContextGetAspectDynamicReturnTypeExtension implements \PHPStan\Type\ { return 'TYPO3\\CMS\\Core\\Context\\Context'; } - public function isMethodSupported(\PHPStan\Reflection\MethodReflection $methodReflection) : bool + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + */ + public function isMethodSupported($methodReflection) : bool { return 'getAspect' === $methodReflection->getName(); } - public function getTypeFromMethodCall(\PHPStan\Reflection\MethodReflection $methodReflection, \PhpParser\Node\Expr\MethodCall $methodCall, \PHPStan\Analyser\Scope $scope) : \PHPStan\Type\Type + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + * @param \PhpParser\Node\Expr\MethodCall $methodCall + * @param \PHPStan\Analyser\Scope $scope + */ + public function getTypeFromMethodCall($methodReflection, $methodCall, $scope) : \PHPStan\Type\Type { $defaultObjectType = new \PHPStan\Type\ObjectType('TYPO3\\CMS\\Core\\Context\\AspectInterface'); if (null === $methodCall->args) { diff --git a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/GeneralUtilityDynamicReturnTypeExtension.php b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/GeneralUtilityDynamicReturnTypeExtension.php index ca713c8ab2c..99f68f6c2c6 100644 --- a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/GeneralUtilityDynamicReturnTypeExtension.php +++ b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/GeneralUtilityDynamicReturnTypeExtension.php @@ -19,11 +19,19 @@ final class GeneralUtilityDynamicReturnTypeExtension implements \PHPStan\Type\Dy { return 'TYPO3\\CMS\\Core\\Utility\\GeneralUtility'; } - public function isStaticMethodSupported(\PHPStan\Reflection\MethodReflection $methodReflection) : bool + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + */ + public function isStaticMethodSupported($methodReflection) : bool { return 'makeInstance' === $methodReflection->getName(); } - public function getTypeFromStaticMethodCall(\PHPStan\Reflection\MethodReflection $methodReflection, \PhpParser\Node\Expr\StaticCall $methodCall, \PHPStan\Analyser\Scope $scope) : \PHPStan\Type\Type + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + * @param \PhpParser\Node\Expr\StaticCall $methodCall + * @param \PHPStan\Analyser\Scope $scope + */ + public function getTypeFromStaticMethodCall($methodReflection, $methodCall, $scope) : \PHPStan\Type\Type { $arg = $methodCall->args[0]->value; if (!$arg instanceof \PhpParser\Node\Expr\ClassConstFetch) { diff --git a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ObjectManagerDynamicReturnTypeExtension.php b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ObjectManagerDynamicReturnTypeExtension.php index 32ac75c713d..ea05276dca6 100644 --- a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ObjectManagerDynamicReturnTypeExtension.php +++ b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ObjectManagerDynamicReturnTypeExtension.php @@ -23,11 +23,19 @@ final class ObjectManagerDynamicReturnTypeExtension implements \PHPStan\Type\Dyn { return 'TYPO3\\CMS\\Extbase\\Object\\ObjectManagerInterface'; } - public function isMethodSupported(\PHPStan\Reflection\MethodReflection $methodReflection) : bool + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + */ + public function isMethodSupported($methodReflection) : bool { return 'get' === $methodReflection->getName(); } - public function getTypeFromMethodCall(\PHPStan\Reflection\MethodReflection $methodReflection, \PhpParser\Node\Expr\MethodCall $methodCall, \PHPStan\Analyser\Scope $scope) : \PHPStan\Type\Type + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + * @param \PhpParser\Node\Expr\MethodCall $methodCall + * @param \PHPStan\Analyser\Scope $scope + */ + public function getTypeFromMethodCall($methodReflection, $methodCall, $scope) : \PHPStan\Type\Type { return $this->argumentTypeResolver->resolveFromMethodCall($methodCall, $methodReflection); } diff --git a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ValidatorResolverDynamicReturnTypeExtension.php b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ValidatorResolverDynamicReturnTypeExtension.php index ea54c2226b6..92964e30848 100644 --- a/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ValidatorResolverDynamicReturnTypeExtension.php +++ b/vendor/ssch/typo3-rector/utils/phpstan/src/Type/ValidatorResolverDynamicReturnTypeExtension.php @@ -23,11 +23,19 @@ final class ValidatorResolverDynamicReturnTypeExtension implements \PHPStan\Type { return 'TYPO3\\CMS\\Extbase\\Validation\\ValidatorResolver\\ValidatorResolver'; } - public function isMethodSupported(\PHPStan\Reflection\MethodReflection $methodReflection) : bool + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + */ + public function isMethodSupported($methodReflection) : bool { return 'createValidator' === $methodReflection->getName(); } - public function getTypeFromMethodCall(\PHPStan\Reflection\MethodReflection $methodReflection, \PhpParser\Node\Expr\MethodCall $methodCall, \PHPStan\Analyser\Scope $scope) : \PHPStan\Type\Type + /** + * @param \PHPStan\Reflection\MethodReflection $methodReflection + * @param \PhpParser\Node\Expr\MethodCall $methodCall + * @param \PHPStan\Analyser\Scope $scope + */ + public function getTypeFromMethodCall($methodReflection, $methodCall, $scope) : \PHPStan\Type\Type { return $this->argumentTypeResolver->resolveFromMethodCall($methodCall, $methodReflection); } diff --git a/vendor/symfony/console/Logger/ConsoleLogger.php b/vendor/symfony/console/Logger/ConsoleLogger.php index 1b574ae45d6..3ae98ba4bd8 100644 --- a/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/vendor/symfony/console/Logger/ConsoleLogger.php @@ -47,8 +47,9 @@ class ConsoleLogger extends \RectorPrefix20211210\Psr\Log\AbstractLogger } /** * {@inheritdoc} + * @param mixed[] $context */ - public function log($level, $message, array $context = []) : void + public function log($level, $message, $context = []) : void { if (!isset($this->verbosityLevelMap[$level])) { throw new \RectorPrefix20211210\Psr\Log\InvalidArgumentException(\sprintf('The log level "%s" does not exist.', $level)); diff --git a/vendor/symfony/console/Output/BufferedOutput.php b/vendor/symfony/console/Output/BufferedOutput.php index 14cb1d5dd75..ea3af4c4e7b 100644 --- a/vendor/symfony/console/Output/BufferedOutput.php +++ b/vendor/symfony/console/Output/BufferedOutput.php @@ -30,8 +30,10 @@ class BufferedOutput extends \RectorPrefix20211210\Symfony\Component\Console\Out } /** * {@inheritdoc} + * @param string $message + * @param bool $newline */ - protected function doWrite(string $message, bool $newline) + protected function doWrite($message, $newline) { $this->buffer .= $message; if ($newline) { diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index cd4ed0df6b2..6256c872ccb 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -60,24 +60,27 @@ class ConsoleOutput extends \RectorPrefix20211210\Symfony\Component\Console\Outp } /** * {@inheritdoc} + * @param bool $decorated */ - public function setDecorated(bool $decorated) + public function setDecorated($decorated) { parent::setDecorated($decorated); $this->stderr->setDecorated($decorated); } /** * {@inheritdoc} + * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter */ - public function setFormatter(\RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter) + public function setFormatter($formatter) { parent::setFormatter($formatter); $this->stderr->setFormatter($formatter); } /** * {@inheritdoc} + * @param int $level */ - public function setVerbosity(int $level) + public function setVerbosity($level) { parent::setVerbosity($level); $this->stderr->setVerbosity($level); @@ -91,8 +94,9 @@ class ConsoleOutput extends \RectorPrefix20211210\Symfony\Component\Console\Outp } /** * {@inheritdoc} + * @param \Symfony\Component\Console\Output\OutputInterface $error */ - public function setErrorOutput(\RectorPrefix20211210\Symfony\Component\Console\Output\OutputInterface $error) + public function setErrorOutput($error) { $this->stderr = $error; } diff --git a/vendor/symfony/console/Output/ConsoleOutputInterface.php b/vendor/symfony/console/Output/ConsoleOutputInterface.php index b3be1adf260..d91cb9981c3 100644 --- a/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ b/vendor/symfony/console/Output/ConsoleOutputInterface.php @@ -22,6 +22,9 @@ interface ConsoleOutputInterface extends \RectorPrefix20211210\Symfony\Component * Gets the OutputInterface for errors. */ public function getErrorOutput() : \RectorPrefix20211210\Symfony\Component\Console\Output\OutputInterface; - public function setErrorOutput(\RectorPrefix20211210\Symfony\Component\Console\Output\OutputInterface $error); + /** + * @param \Symfony\Component\Console\Output\OutputInterface $error + */ + public function setErrorOutput($error); public function section() : \RectorPrefix20211210\Symfony\Component\Console\Output\ConsoleSectionOutput; } diff --git a/vendor/symfony/console/Output/ConsoleSectionOutput.php b/vendor/symfony/console/Output/ConsoleSectionOutput.php index f9cc2da2ea1..24272c0d9de 100644 --- a/vendor/symfony/console/Output/ConsoleSectionOutput.php +++ b/vendor/symfony/console/Output/ConsoleSectionOutput.php @@ -48,7 +48,7 @@ class ConsoleSectionOutput extends \RectorPrefix20211210\Symfony\Component\Conso * * @param int $lines Number of lines to clear. If null, then the entire output of this section is cleared */ - public function clear(int $lines = null) + public function clear($lines = null) { if (empty($this->content) || !$this->isDecorated()) { return; @@ -78,8 +78,9 @@ class ConsoleSectionOutput extends \RectorPrefix20211210\Symfony\Component\Conso } /** * @internal + * @param string $input */ - public function addContent(string $input) + public function addContent($input) { foreach (\explode(\PHP_EOL, $input) as $lineContent) { $this->lines += \ceil($this->getDisplayLength($lineContent) / $this->terminal->getWidth()) ?: 1; @@ -89,8 +90,10 @@ class ConsoleSectionOutput extends \RectorPrefix20211210\Symfony\Component\Conso } /** * {@inheritdoc} + * @param string $message + * @param bool $newline */ - protected function doWrite(string $message, bool $newline) + protected function doWrite($message, $newline) { if (!$this->isDecorated()) { parent::doWrite($message, $newline); diff --git a/vendor/symfony/console/Output/NullOutput.php b/vendor/symfony/console/Output/NullOutput.php index e91f9e411cc..eeb6e140ebc 100644 --- a/vendor/symfony/console/Output/NullOutput.php +++ b/vendor/symfony/console/Output/NullOutput.php @@ -25,8 +25,9 @@ class NullOutput implements \RectorPrefix20211210\Symfony\Component\Console\Outp private $formatter; /** * {@inheritdoc} + * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter */ - public function setFormatter(\RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter) + public function setFormatter($formatter) { // do nothing } @@ -40,8 +41,9 @@ class NullOutput implements \RectorPrefix20211210\Symfony\Component\Console\Outp } /** * {@inheritdoc} + * @param bool $decorated */ - public function setDecorated(bool $decorated) + public function setDecorated($decorated) { // do nothing } @@ -54,8 +56,9 @@ class NullOutput implements \RectorPrefix20211210\Symfony\Component\Console\Outp } /** * {@inheritdoc} + * @param int $level */ - public function setVerbosity(int $level) + public function setVerbosity($level) { // do nothing } @@ -97,16 +100,19 @@ class NullOutput implements \RectorPrefix20211210\Symfony\Component\Console\Outp /** * {@inheritdoc} * @param mixed[]|string $messages + * @param int $options */ - public function writeln($messages, int $options = self::OUTPUT_NORMAL) + public function writeln($messages, $options = self::OUTPUT_NORMAL) { // do nothing } /** * {@inheritdoc} * @param mixed[]|string $messages + * @param bool $newline + * @param int $options */ - public function write($messages, bool $newline = \false, int $options = self::OUTPUT_NORMAL) + public function write($messages, $newline = \false, $options = self::OUTPUT_NORMAL) { // do nothing } diff --git a/vendor/symfony/console/Output/Output.php b/vendor/symfony/console/Output/Output.php index 862e486b06f..bccec315bba 100644 --- a/vendor/symfony/console/Output/Output.php +++ b/vendor/symfony/console/Output/Output.php @@ -45,8 +45,9 @@ abstract class Output implements \RectorPrefix20211210\Symfony\Component\Console } /** * {@inheritdoc} + * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter */ - public function setFormatter(\RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter) + public function setFormatter($formatter) { $this->formatter = $formatter; } @@ -59,8 +60,9 @@ abstract class Output implements \RectorPrefix20211210\Symfony\Component\Console } /** * {@inheritdoc} + * @param bool $decorated */ - public function setDecorated(bool $decorated) + public function setDecorated($decorated) { $this->formatter->setDecorated($decorated); } @@ -73,8 +75,9 @@ abstract class Output implements \RectorPrefix20211210\Symfony\Component\Console } /** * {@inheritdoc} + * @param int $level */ - public function setVerbosity(int $level) + public function setVerbosity($level) { $this->verbosity = $level; } @@ -116,16 +119,19 @@ abstract class Output implements \RectorPrefix20211210\Symfony\Component\Console /** * {@inheritdoc} * @param mixed[]|string $messages + * @param int $options */ - public function writeln($messages, int $options = self::OUTPUT_NORMAL) + public function writeln($messages, $options = self::OUTPUT_NORMAL) { $this->write($messages, \true, $options); } /** * {@inheritdoc} * @param mixed[]|string $messages + * @param bool $newline + * @param int $options */ - public function write($messages, bool $newline = \false, int $options = self::OUTPUT_NORMAL) + public function write($messages, $newline = \false, $options = self::OUTPUT_NORMAL) { if (!\is_iterable($messages)) { $messages = [$messages]; @@ -153,6 +159,8 @@ abstract class Output implements \RectorPrefix20211210\Symfony\Component\Console } /** * Writes a message to the output. + * @param string $message + * @param bool $newline */ - protected abstract function doWrite(string $message, bool $newline); + protected abstract function doWrite($message, $newline); } diff --git a/vendor/symfony/console/Output/OutputInterface.php b/vendor/symfony/console/Output/OutputInterface.php index 77e4598fae5..8e990053ccd 100644 --- a/vendor/symfony/console/Output/OutputInterface.php +++ b/vendor/symfony/console/Output/OutputInterface.php @@ -32,17 +32,18 @@ interface OutputInterface * @param $newline Whether to add a newline * @param $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ - public function write($messages, bool $newline = \false, int $options = 0); + public function write($messages, $newline = \false, $options = 0); /** * Writes a message to the output and adds a newline at the end. * * @param $options A bitmask of options (one of the OUTPUT or VERBOSITY constants), 0 is considered the same as self::OUTPUT_NORMAL | self::VERBOSITY_NORMAL */ - public function writeln($messages, int $options = 0); + public function writeln($messages, $options = 0); /** * Sets the verbosity of the output. + * @param int $level */ - public function setVerbosity(int $level); + public function setVerbosity($level); /** * Gets the current verbosity of the output. */ @@ -65,13 +66,17 @@ interface OutputInterface public function isDebug() : bool; /** * Sets the decorated flag. + * @param bool $decorated */ - public function setDecorated(bool $decorated); + public function setDecorated($decorated); /** * Gets the decorated flag. */ public function isDecorated() : bool; - public function setFormatter(\RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter); + /** + * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter + */ + public function setFormatter($formatter); /** * Returns current output formatter instance. */ diff --git a/vendor/symfony/console/Output/StreamOutput.php b/vendor/symfony/console/Output/StreamOutput.php index 571cf3e60eb..59e384ac3aa 100644 --- a/vendor/symfony/console/Output/StreamOutput.php +++ b/vendor/symfony/console/Output/StreamOutput.php @@ -58,8 +58,10 @@ class StreamOutput extends \RectorPrefix20211210\Symfony\Component\Console\Outpu } /** * {@inheritdoc} + * @param string $message + * @param bool $newline */ - protected function doWrite(string $message, bool $newline) + protected function doWrite($message, $newline) { if ($newline) { $message .= \PHP_EOL; diff --git a/vendor/symfony/console/Output/TrimmedBufferOutput.php b/vendor/symfony/console/Output/TrimmedBufferOutput.php index dcbe03d7ca9..2e6d30f4762 100644 --- a/vendor/symfony/console/Output/TrimmedBufferOutput.php +++ b/vendor/symfony/console/Output/TrimmedBufferOutput.php @@ -46,8 +46,10 @@ class TrimmedBufferOutput extends \RectorPrefix20211210\Symfony\Component\Consol } /** * {@inheritdoc} + * @param string $message + * @param bool $newline */ - protected function doWrite(string $message, bool $newline) + protected function doWrite($message, $newline) { $this->buffer .= $message; if ($newline) { diff --git a/vendor/symfony/console/Style/OutputStyle.php b/vendor/symfony/console/Style/OutputStyle.php index 337ab86b7f8..48ae33a011e 100644 --- a/vendor/symfony/console/Style/OutputStyle.php +++ b/vendor/symfony/console/Style/OutputStyle.php @@ -28,35 +28,43 @@ abstract class OutputStyle implements \RectorPrefix20211210\Symfony\Component\Co } /** * {@inheritdoc} + * @param int $count */ - public function newLine(int $count = 1) + public function newLine($count = 1) { $this->output->write(\str_repeat(\PHP_EOL, $count)); } - public function createProgressBar(int $max = 0) : \RectorPrefix20211210\Symfony\Component\Console\Helper\ProgressBar + /** + * @param int $max + */ + public function createProgressBar($max = 0) : \RectorPrefix20211210\Symfony\Component\Console\Helper\ProgressBar { return new \RectorPrefix20211210\Symfony\Component\Console\Helper\ProgressBar($this->output, $max); } /** * {@inheritdoc} * @param mixed[]|string $messages + * @param bool $newline + * @param int $type */ - public function write($messages, bool $newline = \false, int $type = self::OUTPUT_NORMAL) + public function write($messages, $newline = \false, $type = self::OUTPUT_NORMAL) { $this->output->write($messages, $newline, $type); } /** * {@inheritdoc} * @param mixed[]|string $messages + * @param int $type */ - public function writeln($messages, int $type = self::OUTPUT_NORMAL) + public function writeln($messages, $type = self::OUTPUT_NORMAL) { $this->output->writeln($messages, $type); } /** * {@inheritdoc} + * @param int $level */ - public function setVerbosity(int $level) + public function setVerbosity($level) { $this->output->setVerbosity($level); } @@ -69,8 +77,9 @@ abstract class OutputStyle implements \RectorPrefix20211210\Symfony\Component\Co } /** * {@inheritdoc} + * @param bool $decorated */ - public function setDecorated(bool $decorated) + public function setDecorated($decorated) { $this->output->setDecorated($decorated); } @@ -83,8 +92,9 @@ abstract class OutputStyle implements \RectorPrefix20211210\Symfony\Component\Co } /** * {@inheritdoc} + * @param \Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter */ - public function setFormatter(\RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatterInterface $formatter) + public function setFormatter($formatter) { $this->output->setFormatter($formatter); } diff --git a/vendor/symfony/console/Style/StyleInterface.php b/vendor/symfony/console/Style/StyleInterface.php index 7637e9b1b8a..7b78afa6e8a 100644 --- a/vendor/symfony/console/Style/StyleInterface.php +++ b/vendor/symfony/console/Style/StyleInterface.php @@ -19,16 +19,19 @@ interface StyleInterface { /** * Formats a command title. + * @param string $message */ - public function title(string $message); + public function title($message); /** * Formats a section title. + * @param string $message */ - public function section(string $message); + public function section($message); /** * Formats a list. + * @param mixed[] $elements */ - public function listing(array $elements); + public function listing($elements); /** * Formats informational text. * @param mixed[]|string $message @@ -61,40 +64,54 @@ interface StyleInterface public function caution($message); /** * Formats a table. + * @param mixed[] $headers + * @param mixed[] $rows */ - public function table(array $headers, array $rows); + public function table($headers, $rows); /** * Asks a question. * @return mixed + * @param string $question + * @param string|null $default + * @param callable|null $validator */ - public function ask(string $question, string $default = null, callable $validator = null); + public function ask($question, $default = null, $validator = null); /** * Asks a question with the user input hidden. * @return mixed + * @param string $question + * @param callable|null $validator */ - public function askHidden(string $question, callable $validator = null); + public function askHidden($question, $validator = null); /** * Asks for confirmation. + * @param string $question + * @param bool $default */ - public function confirm(string $question, bool $default = \true) : bool; + public function confirm($question, $default = \true) : bool; /** * Asks a choice question. * @param mixed $default * @return mixed + * @param string $question + * @param mixed[] $choices */ - public function choice(string $question, array $choices, $default = null); + public function choice($question, $choices, $default = null); /** * Add newline(s). + * @param int $count */ - public function newLine(int $count = 1); + public function newLine($count = 1); /** * Starts the progress output. + * @param int $max */ - public function progressStart(int $max = 0); + public function progressStart($max = 0); /** * Advances the progress output X steps. + * @param int $step */ - public function progressAdvance(int $step = 1); + public function progressAdvance($step = 1); /** * Finishes the progress output. */ diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index 3523d58c13e..64bf8c7ec48 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -56,8 +56,13 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style /** * Formats a message as a block of text. * @param mixed[]|string $messages + * @param string|null $type + * @param string|null $style + * @param string $prefix + * @param bool $padding + * @param bool $escape */ - public function block($messages, ?string $type = null, string $style = null, string $prefix = ' ', bool $padding = \false, bool $escape = \true) + public function block($messages, $type = null, $style = null, $prefix = ' ', $padding = \false, $escape = \true) { $messages = \is_array($messages) ? \array_values($messages) : [$messages]; $this->autoPrependBlock(); @@ -66,8 +71,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param string $message */ - public function title(string $message) + public function title($message) { $this->autoPrependBlock(); $this->writeln([\sprintf('%s', \RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash($message)), \sprintf('%s', \str_repeat('=', \RectorPrefix20211210\Symfony\Component\Console\Helper\Helper::width(\RectorPrefix20211210\Symfony\Component\Console\Helper\Helper::removeDecoration($this->getFormatter(), $message))))]); @@ -75,8 +81,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param string $message */ - public function section(string $message) + public function section($message) { $this->autoPrependBlock(); $this->writeln([\sprintf('%s', \RectorPrefix20211210\Symfony\Component\Console\Formatter\OutputFormatter::escapeTrailingBackslash($message)), \sprintf('%s', \str_repeat('-', \RectorPrefix20211210\Symfony\Component\Console\Helper\Helper::width(\RectorPrefix20211210\Symfony\Component\Console\Helper\Helper::removeDecoration($this->getFormatter(), $message))))]); @@ -84,8 +91,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param mixed[] $elements */ - public function listing(array $elements) + public function listing($elements) { $this->autoPrependText(); $elements = \array_map(function ($element) { @@ -164,16 +172,20 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param mixed[] $headers + * @param mixed[] $rows */ - public function table(array $headers, array $rows) + public function table($headers, $rows) { $this->createTable()->setHeaders($headers)->setRows($rows)->render(); $this->newLine(); } /** * Formats a horizontal table. + * @param mixed[] $headers + * @param mixed[] $rows */ - public function horizontalTable(array $headers, array $rows) + public function horizontalTable($headers, $rows) { $this->createTable()->setHorizontal(\true)->setHeaders($headers)->setRows($rows)->render(); $this->newLine(); @@ -213,8 +225,11 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style /** * {@inheritdoc} * @return mixed + * @param string $question + * @param string|null $default + * @param callable|null $validator */ - public function ask(string $question, string $default = null, callable $validator = null) + public function ask($question, $default = null, $validator = null) { $question = new \RectorPrefix20211210\Symfony\Component\Console\Question\Question($question, $default); $question->setValidator($validator); @@ -223,8 +238,10 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style /** * {@inheritdoc} * @return mixed + * @param string $question + * @param callable|null $validator */ - public function askHidden(string $question, callable $validator = null) + public function askHidden($question, $validator = null) { $question = new \RectorPrefix20211210\Symfony\Component\Console\Question\Question($question); $question->setHidden(\true); @@ -233,8 +250,10 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param string $question + * @param bool $default */ - public function confirm(string $question, bool $default = \true) : bool + public function confirm($question, $default = \true) : bool { return $this->askQuestion(new \RectorPrefix20211210\Symfony\Component\Console\Question\ConfirmationQuestion($question, $default)); } @@ -242,8 +261,10 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style * {@inheritdoc} * @param mixed $default * @return mixed + * @param string $question + * @param mixed[] $choices */ - public function choice(string $question, array $choices, $default = null) + public function choice($question, $choices, $default = null) { if (null !== $default) { $values = \array_flip($choices); @@ -253,16 +274,18 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param int $max */ - public function progressStart(int $max = 0) + public function progressStart($max = 0) { $this->progressBar = $this->createProgressBar($max); $this->progressBar->start(); } /** * {@inheritdoc} + * @param int $step */ - public function progressAdvance(int $step = 1) + public function progressAdvance($step = 1) { $this->getProgressBar()->advance($step); } @@ -277,8 +300,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param int $max */ - public function createProgressBar(int $max = 0) : \RectorPrefix20211210\Symfony\Component\Console\Helper\ProgressBar + public function createProgressBar($max = 0) : \RectorPrefix20211210\Symfony\Component\Console\Helper\ProgressBar { $progressBar = parent::createProgressBar($max); if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === \getenv('TERM_PROGRAM')) { @@ -292,16 +316,19 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * @see ProgressBar::iterate() + * @param mixed[] $iterable + * @param int|null $max */ - public function progressIterate(iterable $iterable, int $max = null) : iterable + public function progressIterate($iterable, $max = null) : iterable { yield from $this->createProgressBar()->iterate($iterable, $max); $this->newLine(2); } /** * @return mixed + * @param \Symfony\Component\Console\Question\Question $question */ - public function askQuestion(\RectorPrefix20211210\Symfony\Component\Console\Question\Question $question) + public function askQuestion($question) { if ($this->input->isInteractive()) { $this->autoPrependBlock(); @@ -317,8 +344,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style /** * {@inheritdoc} * @param mixed[]|string $messages + * @param int $type */ - public function writeln($messages, int $type = self::OUTPUT_NORMAL) + public function writeln($messages, $type = self::OUTPUT_NORMAL) { if (!\is_iterable($messages)) { $messages = [$messages]; @@ -331,8 +359,10 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style /** * {@inheritdoc} * @param mixed[]|string $messages + * @param bool $newline + * @param int $type */ - public function write($messages, bool $newline = \false, int $type = self::OUTPUT_NORMAL) + public function write($messages, $newline = \false, $type = self::OUTPUT_NORMAL) { if (!\is_iterable($messages)) { $messages = [$messages]; @@ -344,8 +374,9 @@ class SymfonyStyle extends \RectorPrefix20211210\Symfony\Component\Console\Style } /** * {@inheritdoc} + * @param int $count */ - public function newLine(int $count = 1) + public function newLine($count = 1) { parent::newLine($count); $this->bufferedOutput->write(\str_repeat("\n", $count)); diff --git a/vendor/symfony/dependency-injection/Container.php b/vendor/symfony/dependency-injection/Container.php index 86bc0eaf6ff..bc12d6f8e2e 100644 --- a/vendor/symfony/dependency-injection/Container.php +++ b/vendor/symfony/dependency-injection/Container.php @@ -99,15 +99,17 @@ class Container implements \RectorPrefix20211210\Symfony\Component\DependencyInj * @return array|bool|string|int|float|null * * @throws InvalidArgumentException if the parameter is not defined + * @param string $name */ - public function getParameter(string $name) + public function getParameter($name) { return $this->parameterBag->get($name); } /** * @return bool + * @param string $name */ - public function hasParameter(string $name) + public function hasParameter($name) { return $this->parameterBag->has($name); } @@ -117,7 +119,7 @@ class Container implements \RectorPrefix20211210\Symfony\Component\DependencyInj * @param string $name The parameter name * @param array|bool|string|int|float|null $value The parameter value */ - public function setParameter(string $name, $value) + public function setParameter($name, $value) { $this->parameterBag->set($name, $value); } diff --git a/vendor/symfony/dependency-injection/ContainerInterface.php b/vendor/symfony/dependency-injection/ContainerInterface.php index 18de37e7477..6c5b3615aec 100644 --- a/vendor/symfony/dependency-injection/ContainerInterface.php +++ b/vendor/symfony/dependency-injection/ContainerInterface.php @@ -63,17 +63,19 @@ interface ContainerInterface extends \RectorPrefix20211210\Psr\Container\Contain * @return array|bool|string|int|float|null * * @throws InvalidArgumentException if the parameter is not defined + * @param string $name */ - public function getParameter(string $name); + public function getParameter($name); /** * @return bool + * @param string $name */ - public function hasParameter(string $name); + public function hasParameter($name); /** * Sets a parameter. * * @param string $name The parameter name * @param array|bool|string|int|float|null $value The parameter value */ - public function setParameter(string $name, $value); + public function setParameter($name, $value); } diff --git a/vendor/symfony/string/Slugger/AsciiSlugger.php b/vendor/symfony/string/Slugger/AsciiSlugger.php index 3d7b6b7707a..6231c82c9c7 100644 --- a/vendor/symfony/string/Slugger/AsciiSlugger.php +++ b/vendor/symfony/string/Slugger/AsciiSlugger.php @@ -46,8 +46,9 @@ class AsciiSlugger implements \RectorPrefix20211210\Symfony\Component\String\Slu } /** * {@inheritdoc} + * @param string $locale */ - public function setLocale(string $locale) + public function setLocale($locale) { $this->defaultLocale = $locale; } @@ -60,8 +61,11 @@ class AsciiSlugger implements \RectorPrefix20211210\Symfony\Component\String\Slu } /** * {@inheritdoc} + * @param string $string + * @param string $separator + * @param string|null $locale */ - public function slug(string $string, string $separator = '-', string $locale = null) : \RectorPrefix20211210\Symfony\Component\String\AbstractUnicodeString + public function slug($string, $separator = '-', $locale = null) : \RectorPrefix20211210\Symfony\Component\String\AbstractUnicodeString { $locale = $locale ?? $this->defaultLocale; $transliterator = []; diff --git a/vendor/symfony/string/Slugger/SluggerInterface.php b/vendor/symfony/string/Slugger/SluggerInterface.php index 0ae10741bbb..f58c43e14d4 100644 --- a/vendor/symfony/string/Slugger/SluggerInterface.php +++ b/vendor/symfony/string/Slugger/SluggerInterface.php @@ -20,6 +20,9 @@ interface SluggerInterface { /** * Creates a slug for the given string and locale, using appropriate transliteration when needed. + * @param string $string + * @param string $separator + * @param string|null $locale */ - public function slug(string $string, string $separator = '-', string $locale = null) : \RectorPrefix20211210\Symfony\Component\String\AbstractUnicodeString; + public function slug($string, $separator = '-', $locale = null) : \RectorPrefix20211210\Symfony\Component\String\AbstractUnicodeString; } diff --git a/vendor/symplify/astral/src/NodeVisitor/CallableNodeVisitor.php b/vendor/symplify/astral/src/NodeVisitor/CallableNodeVisitor.php index 07222eaa075..7a25dd4e27b 100644 --- a/vendor/symplify/astral/src/NodeVisitor/CallableNodeVisitor.php +++ b/vendor/symplify/astral/src/NodeVisitor/CallableNodeVisitor.php @@ -20,8 +20,9 @@ final class CallableNodeVisitor extends \PhpParser\NodeVisitorAbstract } /** * @return int|Node|null + * @param \PhpParser\Node $node */ - public function enterNode(\PhpParser\Node $node) + public function enterNode($node) { $originalNode = $node; $callable = $this->callable; diff --git a/vendor/symplify/easy-testing/src/Kernel/EasyTestingKernel.php b/vendor/symplify/easy-testing/src/Kernel/EasyTestingKernel.php index a6fc48e0942..89fae71ea7d 100644 --- a/vendor/symplify/easy-testing/src/Kernel/EasyTestingKernel.php +++ b/vendor/symplify/easy-testing/src/Kernel/EasyTestingKernel.php @@ -11,7 +11,7 @@ final class EasyTestingKernel extends \RectorPrefix20211210\Symplify\SymplifyKer /** * @param string[] $configFiles */ - public function createFromConfigs(array $configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface + public function createFromConfigs($configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface { $configFiles[] = \RectorPrefix20211210\Symplify\EasyTesting\ValueObject\EasyTestingConfig::FILE_PATH; return $this->create([], [], $configFiles); diff --git a/vendor/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php b/vendor/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php index 225825ffa95..43a3f0069ad 100644 --- a/vendor/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php +++ b/vendor/symplify/rule-doc-generator-contracts/src/Contract/Category/CategoryInfererInterface.php @@ -6,5 +6,8 @@ namespace Symplify\RuleDocGenerator\Contract\Category; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; interface CategoryInfererInterface { - public function infer(\Symplify\RuleDocGenerator\ValueObject\RuleDefinition $ruleDefinition) : ?string; + /** + * @param \Symplify\RuleDocGenerator\ValueObject\RuleDefinition $ruleDefinition + */ + public function infer($ruleDefinition) : ?string; } diff --git a/vendor/symplify/rule-doc-generator-contracts/src/Contract/RuleCodeSamplePrinterInterface.php b/vendor/symplify/rule-doc-generator-contracts/src/Contract/RuleCodeSamplePrinterInterface.php index 1b5deef3933..ecc1d1b4f94 100644 --- a/vendor/symplify/rule-doc-generator-contracts/src/Contract/RuleCodeSamplePrinterInterface.php +++ b/vendor/symplify/rule-doc-generator-contracts/src/Contract/RuleCodeSamplePrinterInterface.php @@ -6,9 +6,15 @@ namespace Symplify\RuleDocGenerator\Contract; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; interface RuleCodeSamplePrinterInterface { - public function isMatch(string $class) : bool; + /** + * @param string $class + */ + public function isMatch($class) : bool; /** * @return string[] + * @param \Symplify\RuleDocGenerator\Contract\CodeSampleInterface $codeSample + * @param \Symplify\RuleDocGenerator\ValueObject\RuleDefinition $ruleDefinition + * @param bool $shouldUseConfigureMethod */ - public function print(\Symplify\RuleDocGenerator\Contract\CodeSampleInterface $codeSample, \Symplify\RuleDocGenerator\ValueObject\RuleDefinition $ruleDefinition, bool $shouldUseConfigureMethod) : array; + public function print($codeSample, $ruleDefinition, $shouldUseConfigureMethod) : array; } diff --git a/vendor/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php b/vendor/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php index 9c1b16aee32..ea15c825af4 100644 --- a/vendor/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php +++ b/vendor/symplify/simple-php-doc-parser/src/Contract/PhpDocNodeVisitorInterface.php @@ -9,14 +9,22 @@ use PHPStan\PhpDocParser\Ast\Node; */ interface PhpDocNodeVisitorInterface { - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void; + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void; /** * @return int|Node|null + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node); + public function enterNode($node); /** * @return null|int|\PhpParser\Node|Node[] Replacement node (or special return) + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node); - public function afterTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void; + public function leaveNode($node); + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function afterTraverse($node) : void; } diff --git a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php index ecf9ccd52e2..bed99a0937e 100644 --- a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php +++ b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/AbstractPhpDocNodeVisitor.php @@ -10,24 +10,32 @@ use RectorPrefix20211210\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorI */ abstract class AbstractPhpDocNodeVisitor implements \RectorPrefix20211210\Symplify\SimplePhpDocParser\Contract\PhpDocNodeVisitorInterface { - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { } /** * @return int|Node|null + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) + public function enterNode($node) { return null; } /** * @return null|int|\PhpParser\Node|Node[] Replacement node (or special return) + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node) + public function leaveNode($node) { return null; } - public function afterTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function afterTraverse($node) : void { } } diff --git a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php index a607ef4f39c..d4352fa2e7d 100644 --- a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php +++ b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CallablePhpDocNodeVisitor.php @@ -21,8 +21,9 @@ final class CallablePhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\Sim } /** * @return int|Node|null + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) + public function enterNode($node) { $callable = $this->callable; return $callable($node, $this->docContent); diff --git a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php index 9dd8aaaeb2b..5c5252f477a 100644 --- a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php +++ b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/CloningPhpDocNodeVisitor.php @@ -13,7 +13,10 @@ use RectorPrefix20211210\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttribute */ final class CloningPhpDocNodeVisitor extends \RectorPrefix20211210\Symplify\SimplePhpDocParser\PhpDocNodeVisitor\AbstractPhpDocNodeVisitor { - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : \PHPStan\PhpDocParser\Ast\Node { $clonedNode = clone $node; $clonedNode->setAttribute(\RectorPrefix20211210\Symplify\SimplePhpDocParser\ValueObject\PhpDocAttributeKey::ORIG_NODE, $node); diff --git a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php index 0c758f5cd5f..2b51273106e 100644 --- a/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php +++ b/vendor/symplify/simple-php-doc-parser/src/PhpDocNodeVisitor/ParentConnectingPhpDocNodeVisitor.php @@ -18,11 +18,17 @@ final class ParentConnectingPhpDocNodeVisitor extends \RectorPrefix20211210\Symp * @var Node[] */ private $stack = []; - public function beforeTraverse(\PHPStan\PhpDocParser\Ast\Node $node) : void + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function beforeTraverse($node) : void { $this->stack = [$node]; } - public function enterNode(\PHPStan\PhpDocParser\Ast\Node $node) : \PHPStan\PhpDocParser\Ast\Node + /** + * @param \PHPStan\PhpDocParser\Ast\Node $node + */ + public function enterNode($node) : \PHPStan\PhpDocParser\Ast\Node { if ($this->stack !== []) { $parentNode = $this->stack[\count($this->stack) - 1]; @@ -33,8 +39,9 @@ final class ParentConnectingPhpDocNodeVisitor extends \RectorPrefix20211210\Symp } /** * @return null|int|\PhpParser\Node|Node[] Replacement node (or special return + * @param \PHPStan\PhpDocParser\Ast\Node $node */ - public function leaveNode(\PHPStan\PhpDocParser\Ast\Node $node) + public function leaveNode($node) { \array_pop($this->stack); return null; diff --git a/vendor/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php b/vendor/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php index 212229d9cf4..ee79fbfadf9 100644 --- a/vendor/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php +++ b/vendor/symplify/simple-php-doc-parser/src/ValueObject/Ast/PhpDoc/SimplePhpDocNode.php @@ -11,7 +11,10 @@ use PHPStan\PhpDocParser\Ast\Type\TypeNode; */ class SimplePhpDocNode extends \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode { - public function getParam(string $desiredParamName) : ?\PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode + /** + * @param string $desiredParamName + */ + public function getParam($desiredParamName) : ?\PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode { $desiredParamNameWithDollar = '$' . \ltrim($desiredParamName, '$'); foreach ($this->getParamTagValues() as $paramTagValueNode) { @@ -22,7 +25,10 @@ class SimplePhpDocNode extends \PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode } return null; } - public function getParamType(string $desiredParamName) : ?\PHPStan\PhpDocParser\Ast\Type\TypeNode + /** + * @param string $desiredParamName + */ + public function getParamType($desiredParamName) : ?\PHPStan\PhpDocParser\Ast\Type\TypeNode { $paramTagValueNode = $this->getParam($desiredParamName); if (!$paramTagValueNode instanceof \PHPStan\PhpDocParser\Ast\PhpDoc\ParamTagValueNode) { diff --git a/vendor/symplify/symplify-kernel/src/Contract/LightKernelInterface.php b/vendor/symplify/symplify-kernel/src/Contract/LightKernelInterface.php index bf33685561e..6cb3346b886 100644 --- a/vendor/symplify/symplify-kernel/src/Contract/LightKernelInterface.php +++ b/vendor/symplify/symplify-kernel/src/Contract/LightKernelInterface.php @@ -12,6 +12,6 @@ interface LightKernelInterface /** * @param string[] $configFiles */ - public function createFromConfigs(array $configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface; + public function createFromConfigs($configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface; public function getContainer() : \RectorPrefix20211210\Psr\Container\ContainerInterface; } diff --git a/vendor/symplify/symplify-kernel/src/HttpKernel/AbstractSymplifyKernel.php b/vendor/symplify/symplify-kernel/src/HttpKernel/AbstractSymplifyKernel.php index c2419e2d266..400716321e5 100644 --- a/vendor/symplify/symplify-kernel/src/HttpKernel/AbstractSymplifyKernel.php +++ b/vendor/symplify/symplify-kernel/src/HttpKernel/AbstractSymplifyKernel.php @@ -22,8 +22,10 @@ abstract class AbstractSymplifyKernel implements \RectorPrefix20211210\Symplify\ private $container = null; /** * @param string[] $configFiles + * @param mixed[] $extensions + * @param mixed[] $compilerPasses */ - public function create(array $extensions, array $compilerPasses, array $configFiles) : \RectorPrefix20211210\Symfony\Component\DependencyInjection\ContainerInterface + public function create($extensions, $compilerPasses, $configFiles) : \RectorPrefix20211210\Symfony\Component\DependencyInjection\ContainerInterface { $containerBuilderFactory = new \RectorPrefix20211210\Symplify\SymplifyKernel\ContainerBuilderFactory(new \RectorPrefix20211210\Symplify\SymplifyKernel\Config\Loader\ParameterMergingLoaderFactory()); $compilerPasses[] = new \RectorPrefix20211210\Symplify\AutowireArrayParameter\DependencyInjection\CompilerPass\AutowireArrayParameterCompilerPass(); diff --git a/vendor/symplify/vendor-patches/src/Kernel/VendorPatchesKernel.php b/vendor/symplify/vendor-patches/src/Kernel/VendorPatchesKernel.php index cb6a1f224e6..18b46bb5355 100644 --- a/vendor/symplify/vendor-patches/src/Kernel/VendorPatchesKernel.php +++ b/vendor/symplify/vendor-patches/src/Kernel/VendorPatchesKernel.php @@ -11,7 +11,7 @@ final class VendorPatchesKernel extends \RectorPrefix20211210\Symplify\SymplifyK /** * @param string[] $configFiles */ - public function createFromConfigs(array $configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface + public function createFromConfigs($configFiles) : \RectorPrefix20211210\Psr\Container\ContainerInterface { $configFiles[] = __DIR__ . '/../../config/config.php'; $configFiles[] = \RectorPrefix20211210\Symplify\ComposerJsonManipulator\ValueObject\ComposerJsonManipulatorConfig::FILE_PATH; diff --git a/vendor/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php b/vendor/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php index 58dd2f3e7fb..7be7a5ee339 100644 --- a/vendor/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php +++ b/vendor/tracy/tracy/src/Bridges/Psr/TracyToPsrLoggerAdapter.php @@ -22,7 +22,10 @@ class TracyToPsrLoggerAdapter extends \RectorPrefix20211210\Psr\Log\AbstractLogg { $this->tracyLogger = $tracyLogger; } - public function log($level, $message, array $context = []) : void + /** + * @param mixed[] $context + */ + public function log($level, $message, $context = []) : void { $level = self::LEVEL_MAP[$level] ?? \RectorPrefix20211210\Tracy\ILogger::ERROR; if (isset($context['exception']) && $context['exception'] instanceof \Throwable) {