From 12b68dc1da7384de91b6b120cbbb79f3bb8984b4 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Sun, 6 Aug 2023 00:29:06 +0000 Subject: [PATCH] Updated Rector to commit 44e0216970b230925f2e104ce6762b27b86a853e https://github.com/rectorphp/rector-src/commit/44e0216970b230925f2e104ce6762b27b86a853e [automated] Re-Generate Nodes/Rectors Documentation (#4665) --- docs/rector_rules_overview.md | 34 ++++++++++++++++------------- src/Application/VersionResolver.php | 4 ++-- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 ++++----- vendor/composer/autoload_static.php | 8 +++---- 5 files changed, 31 insertions(+), 27 deletions(-) diff --git a/docs/rector_rules_overview.md b/docs/rector_rules_overview.md index a4913108ef4..4f04236e749 100644 --- a/docs/rector_rules_overview.md +++ b/docs/rector_rules_overview.md @@ -1,4 +1,4 @@ -# 362 Rules Overview +# 361 Rules Overview
@@ -14,6 +14,8 @@ - [EarlyReturn](#earlyreturn) (9) +- [Instanceof_](#instanceof) (1) + - [Naming](#naming) (6) - [Php52](#php52) (2) @@ -52,7 +54,7 @@ - [Transform](#transform) (22) -- [TypeDeclaration](#typedeclaration) (44) +- [TypeDeclaration](#typedeclaration) (43) - [Visibility](#visibility) (3) @@ -3382,6 +3384,21 @@ Replace if conditioned variable override with direct return
+## Instanceof_ + +### FlipNegatedTernaryInstanceofRector + +Flip negated ternary of instanceof to direct use of object + +- class: [`Rector\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector`](../rules/Instanceof_/Rector/Ternary/FlipNegatedTernaryInstanceofRector.php) + +```diff +-echo ! $object instanceof Product ? null : $object->getPrice(); ++echo $object instanceof Product ? $object->getPrice() : null; +``` + +
+ ## Naming ### RenameForeachValueVariableToMatchExprVariableRector @@ -7722,19 +7739,6 @@ Change `empty()` on nullable object to instanceof check
-### FlipNegatedTernaryInstanceofRector - -Flip negated ternary of instanceof to direct use of object - -- class: [`Rector\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector`](../rules/TypeDeclaration/Rector/Ternary/FlipNegatedTernaryInstanceofRector.php) - -```diff --echo ! $object instanceof Product ? null : $object->getPrice(); -+echo $object instanceof Product ? $object->getPrice() : null; -``` - -
- ### NumericReturnTypeFromStrictScalarReturnsRector Change numeric return type based on strict returns type operations diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 7878a8a19c8..a2ef717ed82 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '4cfe654f85ed549b39512bef2e780cc5e37d59e9'; + public const PACKAGE_VERSION = '44e0216970b230925f2e104ce6762b27b86a853e'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-08-06 00:24:54'; + public const RELEASE_DATE = '2023-08-06 00:25:29'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 00cd41ebf20..87197b8f0db 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit32a82651acfc7b50e2c510536cb2eedf::getLoader(); +return ComposerAutoloaderInite04f66bc7a502c025fca16ebcf0ffca6::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 800fe2b0df0..bbd06bb2dff 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit32a82651acfc7b50e2c510536cb2eedf +class ComposerAutoloaderInite04f66bc7a502c025fca16ebcf0ffca6 { private static $loader; @@ -22,17 +22,17 @@ class ComposerAutoloaderInit32a82651acfc7b50e2c510536cb2eedf return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit32a82651acfc7b50e2c510536cb2eedf', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInite04f66bc7a502c025fca16ebcf0ffca6', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit32a82651acfc7b50e2c510536cb2eedf', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInite04f66bc7a502c025fca16ebcf0ffca6', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 642585028a1..714468c6a5b 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf +class ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3011,9 +3011,9 @@ class ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit32a82651acfc7b50e2c510536cb2eedf::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInite04f66bc7a502c025fca16ebcf0ffca6::$classMap; }, null, ClassLoader::class); }