mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit a78fb1b970be42619495215a2612d032a6ecdbee
a78fb1b970
Fix scoper (#5739)
This commit is contained in:
parent
dac0717196
commit
ac990f2560
|
@ -1742,12 +1742,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
|
||||
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f"
|
||||
"reference": "eadea252dae87d8703ce171ec8fb2682f455c5b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/9a6a85b2b37c51a5c83414269dc2aab09650967f",
|
||||
"reference": "9a6a85b2b37c51a5c83414269dc2aab09650967f",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/eadea252dae87d8703ce171ec8fb2682f455c5b9",
|
||||
"reference": "eadea252dae87d8703ce171ec8fb2682f455c5b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1769,7 +1769,7 @@
|
|||
"tomasvotruba\/class-leak": "^0.2",
|
||||
"tracy\/tracy": "^2.10"
|
||||
},
|
||||
"time": "2024-03-08T06:34:42+00:00",
|
||||
"time": "2024-03-19T09:23:20+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a1d50bb'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main 9a6a85b'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6845db4'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main c8b6413'));
|
||||
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main a1d50bb'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main eadea25'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6845db4'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main c8b6413'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -91,14 +91,15 @@ CODE_SAMPLE
|
|||
}
|
||||
private function refactorPropertyFetch(PropertyFetch $propertyFetch) : ?Ternary
|
||||
{
|
||||
if (!$this->isName($propertyFetch->name, 'text')) {
|
||||
$propertyFetchName = $this->getName($propertyFetch->name);
|
||||
if (!\in_array($propertyFetchName, ['id', 'text'], \true)) {
|
||||
return null;
|
||||
}
|
||||
if (!$this->isObjectType($propertyFetch->var, new ObjectType(self::PHP_TOKEN))) {
|
||||
return null;
|
||||
}
|
||||
$isArrayFuncCall = new FuncCall(new Name('is_array'), [new Arg($propertyFetch->var)]);
|
||||
$arrayDimFetch = new ArrayDimFetch($propertyFetch->var, new LNumber(1));
|
||||
$arrayDimFetch = new ArrayDimFetch($propertyFetch->var, $propertyFetchName === 'id' ? new LNumber(0) : new LNumber(1));
|
||||
return new Ternary($isArrayFuncCall, $arrayDimFetch, $propertyFetch->var);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue