mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 5612c7f86c18379ccd927bba33bca524f94f0759
5612c7f86c
[Php71] Remove direct return STOP_TRAVERSAL on CountOnNullRector (#4189)
This commit is contained in:
parent
f45714304b
commit
9434de01cc
|
@ -16,7 +16,6 @@ use PhpParser\Node\Expr\Variable;
|
|||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Scalar\LNumber;
|
||||
use PhpParser\Node\Stmt\Trait_;
|
||||
use PhpParser\NodeTraverser;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Type\ArrayType;
|
||||
|
@ -88,18 +87,14 @@ CODE_SAMPLE
|
|||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [Trait_::class, FuncCall::class, Ternary::class];
|
||||
return [FuncCall::class, Ternary::class];
|
||||
}
|
||||
/**
|
||||
* @param Trait_|FuncCall|Ternary $node
|
||||
* @param FuncCall|Ternary $node
|
||||
* @return int|\PhpParser\Node\Expr\Ternary|null|\PhpParser\Node\Expr\FuncCall
|
||||
*/
|
||||
public function refactorWithScope(Node $node, Scope $scope)
|
||||
{
|
||||
if ($node instanceof Trait_) {
|
||||
// skip contents in traits, as hard to analyze
|
||||
return NodeTraverser::STOP_TRAVERSAL;
|
||||
}
|
||||
if ($node instanceof Ternary) {
|
||||
if ($this->shouldSkipTernaryIfElseCountFuncCall($node)) {
|
||||
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a9efd7240e38596d09eedbea3670ee20e32e0d1f';
|
||||
public const PACKAGE_VERSION = '5612c7f86c18379ccd927bba33bca524f94f0759';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-12 10:13:36';
|
||||
public const RELEASE_DATE = '2023-06-12 10:14:02';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
|
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit117682469281d15fcde576f716fdc60d::getLoader();
|
||||
return ComposerAutoloaderInite954490b57b752f4c8c8f19ac66591bf::getLoader();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit117682469281d15fcde576f716fdc60d
|
||||
class ComposerAutoloaderInite954490b57b752f4c8c8f19ac66591bf
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,17 +22,17 @@ class ComposerAutoloaderInit117682469281d15fcde576f716fdc60d
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit117682469281d15fcde576f716fdc60d', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInite954490b57b752f4c8c8f19ac66591bf', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit117682469281d15fcde576f716fdc60d', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite954490b57b752f4c8c8f19ac66591bf', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit117682469281d15fcde576f716fdc60d::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite954490b57b752f4c8c8f19ac66591bf::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit117682469281d15fcde576f716fdc60d::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInite954490b57b752f4c8c8f19ac66591bf::$files;
|
||||
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit117682469281d15fcde576f716fdc60d
|
||||
class ComposerStaticInite954490b57b752f4c8c8f19ac66591bf
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3123,9 +3123,9 @@ class ComposerStaticInit117682469281d15fcde576f716fdc60d
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit117682469281d15fcde576f716fdc60d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit117682469281d15fcde576f716fdc60d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit117682469281d15fcde576f716fdc60d::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite954490b57b752f4c8c8f19ac66591bf::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite954490b57b752f4c8c8f19ac66591bf::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite954490b57b752f4c8c8f19ac66591bf::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue