Skip to content

Commit

Permalink
Updated Rector to commit bbd2e81b171f50d05ef73d63518cb1a31fdd7cd5
Browse files Browse the repository at this point in the history
rectorphp/rector-src@bbd2e81 Merge many Skipper tests to one, cleanup phpstan errors (#4806)
  • Loading branch information
TomasVotruba committed Aug 17, 2023
1 parent 64b92c8 commit 314c192
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 22 deletions.
3 changes: 3 additions & 0 deletions packages/Caching/ValueObject/Storage/FileCacheStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public function __construct(string $directory, \RectorPrefix202308\Symfony\Compo
$this->directory = $directory;
$this->filesystem = $filesystem;
}
/**
* @return mixed
*/
public function load(string $key, string $variableKey)
{
return (function (string $key, string $variableKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class StmtKeyNodeVisitor extends NodeVisitorAbstract implements ScopeResol
/**
* @param Node[] $nodes
*/
public function beforeTraverse(array $nodes)
public function beforeTraverse(array $nodes) : ?array
{
if ($nodes === []) {
return null;
Expand Down
3 changes: 3 additions & 0 deletions packages/PhpDocParser/NodeVisitor/CallableNodeVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ public function __construct(callable $callable)
{
$this->callable = $callable;
}
/**
* @return int|\PhpParser\Node|null
*/
public function enterNode(Node $node)
{
$originalNode = $node;
Expand Down
2 changes: 1 addition & 1 deletion packages/Skipper/Skipper/Skipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Rector\Skipper\SkipVoter\PathSkipVoter;
/**
* @api
* @see \Rector\Tests\Skipper\Skipper\Skipper\SkipperTest
* @see \Rector\Tests\Skipper\Skipper\SkipperTest
*/
final class Skipper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Rector\NodeNameResolver\NodeNameResolver;
use Rector\NodeTypeResolver\TypeComparator\TypeComparator;
use Rector\StaticTypeMapper\StaticTypeMapper;
use Rector\Tests\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector\Source\Method;
use Rector\VendorLocker\Exception\UnresolvableClassException;
final class ParentClassMethodTypeOverrideGuard
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use Rector\Core\Php\PhpVersionProvider;
use Rector\Core\PhpParser\AstResolver;
use Rector\Core\Rector\AbstractRector;
use Rector\Core\ValueObject\MethodName;
use Rector\Core\ValueObject\PhpVersionFeature;
Expand Down
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '0.17.14';
public const PACKAGE_VERSION = 'bbd2e81b171f50d05ef73d63518cb1a31fdd7cd5';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-08-17 16:03:24';
public const RELEASE_DATE = '2023-08-17 10:10:32';
/**
* @var int
*/
Expand Down
5 changes: 2 additions & 3 deletions src/PhpParser/NodeTraverser/RectorNodeTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public function __construct(array $phpRectors, PhpVersionedFilter $phpVersionedF
parent::__construct();
}
/**
* @template TNode as Node
* @param TNode[] $nodes
* @return TNode[]
* @param Node[] $nodes
* @return Node[]
*/
public function traverse(array $nodes) : array
{
Expand Down
4 changes: 4 additions & 0 deletions src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public function beforeTraverse(array $nodes) : ?array
$this->file = $file;
return parent::beforeTraverse($nodes);
}
/**
* @return int|\PhpParser\Node|null
*/
public final function enterNode(Node $node)
{
if (!$this->isMatchingNodeType($node)) {
Expand Down Expand Up @@ -215,6 +218,7 @@ public final function enterNode(Node $node)
/**
* 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
* @return mixed[]|int|\PhpParser\Node|null
*/
public function leaveNode(Node $node)
{
Expand Down
6 changes: 3 additions & 3 deletions src/ValueObject/Application/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ final class File
*/
private $fileDiff;
/**
* @var Stmt[]
* @var \PhpParser\Node[]
*/
private $oldStmts = [];
/**
* @var Stmt[]
* @var \PhpParser\Node[]
*/
private $newStmts = [];
/**
Expand Down Expand Up @@ -128,7 +128,7 @@ public function getOldTokens() : array
return $this->oldTokens;
}
/**
* @param Stmt[] $newStmts
* @param \PhpParser\Node[] $newStmts
*/
public function changeNewStmts(array $newStmts) : void
{
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit505621b1b429be9011c68653da82e274::getLoader();
return ComposerAutoloaderInitc928f94e7958d7191efcf30da806357c::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit505621b1b429be9011c68653da82e274
class ComposerAutoloaderInitc928f94e7958d7191efcf30da806357c
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit505621b1b429be9011c68653da82e274', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitc928f94e7958d7191efcf30da806357c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit505621b1b429be9011c68653da82e274', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitc928f94e7958d7191efcf30da806357c', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit505621b1b429be9011c68653da82e274::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitc928f94e7958d7191efcf30da806357c::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit505621b1b429be9011c68653da82e274::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitc928f94e7958d7191efcf30da806357c::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit505621b1b429be9011c68653da82e274
class ComposerStaticInitc928f94e7958d7191efcf30da806357c
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -2637,9 +2637,9 @@ class ComposerStaticInit505621b1b429be9011c68653da82e274
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit505621b1b429be9011c68653da82e274::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit505621b1b429be9011c68653da82e274::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit505621b1b429be9011c68653da82e274::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitc928f94e7958d7191efcf30da806357c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc928f94e7958d7191efcf30da806357c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc928f94e7958d7191efcf30da806357c::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit 314c192

Please sign in to comment.