Skip to content

Commit 314c192

Browse files
committed
Updated Rector to commit bbd2e81b171f50d05ef73d63518cb1a31fdd7cd5
rectorphp/rector-src@bbd2e81 Merge many Skipper tests to one, cleanup phpstan errors (#4806)
1 parent 64b92c8 commit 314c192

File tree

13 files changed

+29
-22
lines changed

13 files changed

+29
-22
lines changed

packages/Caching/ValueObject/Storage/FileCacheStorage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function __construct(string $directory, \RectorPrefix202308\Symfony\Compo
3131
$this->directory = $directory;
3232
$this->filesystem = $filesystem;
3333
}
34+
/**
35+
* @return mixed
36+
*/
3437
public function load(string $key, string $variableKey)
3538
{
3639
return (function (string $key, string $variableKey) {

packages/NodeTypeResolver/PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ final class StmtKeyNodeVisitor extends NodeVisitorAbstract implements ScopeResol
1616
/**
1717
* @param Node[] $nodes
1818
*/
19-
public function beforeTraverse(array $nodes)
19+
public function beforeTraverse(array $nodes) : ?array
2020
{
2121
if ($nodes === []) {
2222
return null;

packages/PhpDocParser/NodeVisitor/CallableNodeVisitor.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ public function __construct(callable $callable)
2626
{
2727
$this->callable = $callable;
2828
}
29+
/**
30+
* @return int|\PhpParser\Node|null
31+
*/
2932
public function enterNode(Node $node)
3033
{
3134
$originalNode = $node;

packages/Skipper/Skipper/Skipper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Rector\Skipper\SkipVoter\PathSkipVoter;
1212
/**
1313
* @api
14-
* @see \Rector\Tests\Skipper\Skipper\Skipper\SkipperTest
14+
* @see \Rector\Tests\Skipper\Skipper\SkipperTest
1515
*/
1616
final class Skipper
1717
{

packages/VendorLocker/ParentClassMethodTypeOverrideGuard.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Rector\NodeNameResolver\NodeNameResolver;
1313
use Rector\NodeTypeResolver\TypeComparator\TypeComparator;
1414
use Rector\StaticTypeMapper\StaticTypeMapper;
15-
use Rector\Tests\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector\Source\Method;
1615
use Rector\VendorLocker\Exception\UnresolvableClassException;
1716
final class ParentClassMethodTypeOverrideGuard
1817
{

rules/TypeDeclaration/Rector/ClassMethod/AddReturnTypeDeclarationBasedOnParentClassMethodRector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use PHPStan\Type\ObjectType;
1313
use PHPStan\Type\Type;
1414
use Rector\Core\Php\PhpVersionProvider;
15-
use Rector\Core\PhpParser\AstResolver;
1615
use Rector\Core\Rector\AbstractRector;
1716
use Rector\Core\ValueObject\MethodName;
1817
use Rector\Core\ValueObject\PhpVersionFeature;

src/Application/VersionResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '0.17.14';
22+
public const PACKAGE_VERSION = 'bbd2e81b171f50d05ef73d63518cb1a31fdd7cd5';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2023-08-17 16:03:24';
27+
public const RELEASE_DATE = '2023-08-17 10:10:32';
2828
/**
2929
* @var int
3030
*/

src/PhpParser/NodeTraverser/RectorNodeTraverser.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ public function __construct(array $phpRectors, PhpVersionedFilter $phpVersionedF
3232
parent::__construct();
3333
}
3434
/**
35-
* @template TNode as Node
36-
* @param TNode[] $nodes
37-
* @return TNode[]
35+
* @param Node[] $nodes
36+
* @return Node[]
3837
*/
3938
public function traverse(array $nodes) : array
4039
{

src/Rector/AbstractRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ public function beforeTraverse(array $nodes) : ?array
161161
$this->file = $file;
162162
return parent::beforeTraverse($nodes);
163163
}
164+
/**
165+
* @return int|\PhpParser\Node|null
166+
*/
164167
public final function enterNode(Node $node)
165168
{
166169
if (!$this->isMatchingNodeType($node)) {
@@ -215,6 +218,7 @@ public final function enterNode(Node $node)
215218
/**
216219
* Replacing nodes in leaveNode() method avoids infinite recursion
217220
* see"infinite recursion" in https://github.com/nikic/PHP-Parser/blob/master/doc/component/Walking_the_AST.markdown
221+
* @return mixed[]|int|\PhpParser\Node|null
218222
*/
219223
public function leaveNode(Node $node)
220224
{

src/ValueObject/Application/File.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ final class File
3535
*/
3636
private $fileDiff;
3737
/**
38-
* @var Stmt[]
38+
* @var \PhpParser\Node[]
3939
*/
4040
private $oldStmts = [];
4141
/**
42-
* @var Stmt[]
42+
* @var \PhpParser\Node[]
4343
*/
4444
private $newStmts = [];
4545
/**
@@ -128,7 +128,7 @@ public function getOldTokens() : array
128128
return $this->oldTokens;
129129
}
130130
/**
131-
* @param Stmt[] $newStmts
131+
* @param \PhpParser\Node[] $newStmts
132132
*/
133133
public function changeNewStmts(array $newStmts) : void
134134
{

0 commit comments

Comments
 (0)