Updated Rector to commit f51f41de2b5ff26632e2322dbf2795ead1447e45

f51f41de2b Rectify (#6709)
This commit is contained in:
Tomas Votruba 2025-01-31 14:59:18 +00:00
parent c435e209d4
commit ccb7da585d
4 changed files with 9 additions and 9 deletions

View File

@ -1804,12 +1804,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-phpunit.git",
"reference": "e7e84da934d024a54d39abf1bb802a337450202e"
"reference": "61f5874d64467a17b9c88529077a9c22d718f0eb"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/e7e84da934d024a54d39abf1bb802a337450202e",
"reference": "e7e84da934d024a54d39abf1bb802a337450202e",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-phpunit\/zipball\/61f5874d64467a17b9c88529077a9c22d718f0eb",
"reference": "61f5874d64467a17b9c88529077a9c22d718f0eb",
"shasum": ""
},
"require": {
@ -1830,7 +1830,7 @@
"tomasvotruba\/class-leak": "^1.2",
"tracy\/tracy": "^2.10"
},
"time": "2025-01-29T07:00:36+00:00",
"time": "2025-01-31T14:02:02+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {

File diff suppressed because one or more lines are too long

View File

@ -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 ceda7a4'), '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 6dba109'), '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 e7e84da'), '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 4661c01'));
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 ceda7a4'), '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 6dba109'), '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 61f5874'), '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 4661c01'));
private function __construct()
{
}

View File

@ -31,7 +31,7 @@ final class AssertEmptyNullableObjectToAssertInstanceofRector extends AbstractRe
}
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Change assertNotEmpty() on an object to more clear assertInstanceof()', [new CodeSample(<<<'CODE_SAMPLE'
return new RuleDefinition('Change assertNotEmpty() and assertNotNull() on an object to more clear assertInstanceof()', [new CodeSample(<<<'CODE_SAMPLE'
use PHPUnit\Framework\TestCase;
class SomeClass extends TestCase
@ -74,7 +74,7 @@ CODE_SAMPLE
if (!$this->testsNodeAnalyzer->isInTestClass($node)) {
return null;
}
if (!$this->isNames($node->name, ['assertNotEmpty', 'assertEmpty'])) {
if (!$this->isNames($node->name, ['assertNotEmpty', 'assertEmpty', 'assertNull', 'assertNotNull'])) {
return null;
}
if ($node->isFirstClassCallable()) {
@ -92,7 +92,7 @@ CODE_SAMPLE
if (!$pureType instanceof ObjectType) {
return null;
}
$methodName = $this->isName($node->name, 'assertEmpty') ? 'assertNotInstanceOf' : 'assertInstanceOf';
$methodName = $this->isNames($node->name, ['assertEmpty', 'assertNull']) ? 'assertNotInstanceOf' : 'assertInstanceOf';
$node->name = new Identifier($methodName);
$fullyQualified = new FullyQualified($pureType->getClassName());
$node->args[0] = new Arg(new ClassConstFetch($fullyQualified, 'class'));