mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-04 02:10:51 +00:00
Updated Rector to commit 90adbf0431d2f63e80bbb10807ff2786e19f068c
90adbf0431
[DeadCode] Skip assign if cond on RemoveUnusedNonEmptyArrayBeforeForeachRector (#2918)
This commit is contained in:
parent
ed362f4e21
commit
c5b7bc6035
|
@ -7,7 +7,6 @@ use PhpParser\Node;
|
|||
use PhpParser\Node\Expr\Assign;
|
||||
use PhpParser\Node\Expr\Variable;
|
||||
use PhpParser\Node\Stmt;
|
||||
use PhpParser\Node\Stmt\Expression;
|
||||
use PhpParser\Node\Stmt\Foreach_;
|
||||
use PhpParser\Node\Stmt\If_;
|
||||
use PHPStan\Type\ArrayType;
|
||||
|
@ -100,7 +99,7 @@ CODE_SAMPLE
|
|||
/** @var Foreach_ $stmt */
|
||||
$stmt = $node->stmts[0];
|
||||
if ($node->cond instanceof Assign) {
|
||||
return [new Expression($node->cond), $stmt];
|
||||
return null;
|
||||
}
|
||||
$ifComments = $node->getAttribute(AttributeKey::COMMENTS) ?? [];
|
||||
$stmtComments = $stmt->getAttribute(AttributeKey::COMMENTS) ?? [];
|
||||
|
|
|
@ -17,12 +17,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '3de25c9cd3e7efcfa92c94f3cbdc533fdd6a115b';
|
||||
public const PACKAGE_VERSION = '90adbf0431d2f63e80bbb10807ff2786e19f068c';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-09-07 10:28:45';
|
||||
public const RELEASE_DATE = '2022-09-07 12:19:20';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24::getLoader();
|
||||
return ComposerAutoloaderInite4636eadd7fa27e3d5fb164866d8d011::getLoader();
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24
|
||||
class ComposerAutoloaderInite4636eadd7fa27e3d5fb164866d8d011
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,19 +22,19 @@ class ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInite4636eadd7fa27e3d5fb164866d8d011', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInite4636eadd7fa27e3d5fb164866d8d011', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequirea76435b992936b5d5f3faaaef7cbaf24($fileIdentifier, $file);
|
||||
composerRequiree4636eadd7fa27e3d5fb164866d8d011($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -46,7 +46,7 @@ class ComposerAutoloaderInita76435b992936b5d5f3faaaef7cbaf24
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequirea76435b992936b5d5f3faaaef7cbaf24($fileIdentifier, $file)
|
||||
function composerRequiree4636eadd7fa27e3d5fb164866d8d011($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24
|
||||
class ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
|
@ -3093,9 +3093,9 @@ class ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita76435b992936b5d5f3faaaef7cbaf24::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInite4636eadd7fa27e3d5fb164866d8d011::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
26
vendor/composer/installed.json
vendored
26
vendor/composer/installed.json
vendored
|
@ -296,31 +296,31 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine\/inflector",
|
||||
"version": "2.0.4",
|
||||
"version_normalized": "2.0.4.0",
|
||||
"version": "2.0.5",
|
||||
"version_normalized": "2.0.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/doctrine\/inflector.git",
|
||||
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89"
|
||||
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/doctrine\/inflector\/zipball\/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
|
||||
"reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89",
|
||||
"url": "https:\/\/api.github.com\/repos\/doctrine\/inflector\/zipball\/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
|
||||
"reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine\/coding-standard": "^8.2",
|
||||
"phpstan\/phpstan": "^0.12",
|
||||
"phpstan\/phpstan-phpunit": "^0.12",
|
||||
"phpstan\/phpstan-strict-rules": "^0.12",
|
||||
"phpunit\/phpunit": "^7.0 || ^8.0 || ^9.0",
|
||||
"vimeo\/psalm": "^4.10"
|
||||
"doctrine\/coding-standard": "^9",
|
||||
"phpstan\/phpstan": "^1.8",
|
||||
"phpstan\/phpstan-phpunit": "^1.1",
|
||||
"phpstan\/phpstan-strict-rules": "^1.3",
|
||||
"phpunit\/phpunit": "^8.5 || ^9.5",
|
||||
"vimeo\/psalm": "^4.25"
|
||||
},
|
||||
"time": "2021-10-22T20:16:43+00:00",
|
||||
"time": "2022-09-07T09:01:28+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
@ -370,7 +370,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/doctrine\/inflector\/issues",
|
||||
"source": "https:\/\/github.com\/doctrine\/inflector\/tree\/2.0.4"
|
||||
"source": "https:\/\/github.com\/doctrine\/inflector\/tree\/2.0.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
17
vendor/doctrine/inflector/composer.json
vendored
17
vendor/doctrine/inflector/composer.json
vendored
|
@ -42,12 +42,12 @@
|
|||
"php": "^7.2 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine\/coding-standard": "^8.2",
|
||||
"phpstan\/phpstan": "^0.12",
|
||||
"phpstan\/phpstan-phpunit": "^0.12",
|
||||
"phpstan\/phpstan-strict-rules": "^0.12",
|
||||
"phpunit\/phpunit": "^7.0 || ^8.0 || ^9.0",
|
||||
"vimeo\/psalm": "^4.10"
|
||||
"doctrine\/coding-standard": "^9",
|
||||
"phpstan\/phpstan": "^1.8",
|
||||
"phpstan\/phpstan-phpunit": "^1.1",
|
||||
"phpstan\/phpstan-strict-rules": "^1.3",
|
||||
"phpunit\/phpunit": "^8.5 || ^9.5",
|
||||
"vimeo\/psalm": "^4.25"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
@ -58,5 +58,10 @@
|
|||
"psr-4": {
|
||||
"RectorPrefix202209\\Doctrine\\Tests\\Inflector\\": "tests\/Doctrine\/Tests\/Inflector"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect\/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -54,6 +54,8 @@ class Inflectible
|
|||
(yield new Transformation(new Pattern('(f)eet$'), '\\1oot'));
|
||||
(yield new Transformation(new Pattern('(n)ews$'), 'RectorPrefix202209\\1\\2ews'));
|
||||
(yield new Transformation(new Pattern('eaus$'), 'eau'));
|
||||
(yield new Transformation(new Pattern('^tights$'), 'tights'));
|
||||
(yield new Transformation(new Pattern('^shorts$'), 'shorts'));
|
||||
(yield new Transformation(new Pattern('s$'), ''));
|
||||
}
|
||||
/**
|
||||
|
@ -95,6 +97,7 @@ class Inflectible
|
|||
(yield new Substitution(new Word('atlas'), new Word('atlases')));
|
||||
(yield new Substitution(new Word('axe'), new Word('axes')));
|
||||
(yield new Substitution(new Word('beef'), new Word('beefs')));
|
||||
(yield new Substitution(new Word('blouse'), new Word('blouses')));
|
||||
(yield new Substitution(new Word('brother'), new Word('brothers')));
|
||||
(yield new Substitution(new Word('cafe'), new Word('cafes')));
|
||||
(yield new Substitution(new Word('chateau'), new Word('chateaux')));
|
||||
|
|
|
@ -58,6 +58,7 @@ final class Uninflected
|
|||
(yield new Pattern('butter'));
|
||||
(yield new Pattern('cantus'));
|
||||
(yield new Pattern('carp'));
|
||||
(yield new Pattern('cattle'));
|
||||
(yield new Pattern('chassis'));
|
||||
(yield new Pattern('clippers'));
|
||||
(yield new Pattern('clothing'));
|
||||
|
@ -105,6 +106,7 @@ final class Uninflected
|
|||
(yield new Pattern('jackanapes'));
|
||||
(yield new Pattern('jeans'));
|
||||
(yield new Pattern('jedi'));
|
||||
(yield new Pattern('kin'));
|
||||
(yield new Pattern('kiplingese'));
|
||||
(yield new Pattern('knowledge'));
|
||||
(yield new Pattern('kongoese'));
|
||||
|
|
13
vendor/doctrine/inflector/phpstan.neon.dist
vendored
13
vendor/doctrine/inflector/phpstan.neon.dist
vendored
|
@ -1,13 +0,0 @@
|
|||
includes:
|
||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||
- vendor/phpstan/phpstan-phpunit/rules.neon
|
||||
- vendor/phpstan/phpstan-strict-rules/rules.neon
|
||||
|
||||
parameters:
|
||||
level: 7
|
||||
paths:
|
||||
- lib
|
||||
- tests
|
||||
|
||||
excludes_analyse:
|
||||
- %rootDir%/../../../tests/Doctrine/Tests/Common/*
|
15
vendor/doctrine/inflector/psalm.xml
vendored
15
vendor/doctrine/inflector/psalm.xml
vendored
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="7"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="lib/Doctrine/Inflector" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
</psalm>
|
Loading…
Reference in New Issue
Block a user