fix Revert "refactor: re-run rector"

This reverts commit 65b71e963b1cb6f36b284ae0e5be13faabe33ff4.

fix: skip rector.php
This commit is contained in:
Abdul Malik Ikhsan 2025-02-11 14:30:12 +07:00
parent 65b71e963b
commit 1925f692bc
No known key found for this signature in database
GPG Key ID: 69AC5BC354C89BE6
6 changed files with 12 additions and 9 deletions

View File

@ -37,6 +37,7 @@ use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\YieldDataProviderRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertCountWithZeroToAssertEmptyRector;
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\Strict\Rector\If_\BooleanInIfConditionRuleFixerRector;
@ -168,6 +169,8 @@ return RectorConfig::configure()
NullToStrictStringFuncCallArgRector::class,
CompactToVariablesRector::class,
AssertCountWithZeroToAssertEmptyRector::class,
])
// auto import fully qualified class names
->withImportNames(removeUnusedImports: true)

View File

@ -1292,7 +1292,7 @@ final class ForgeTest extends CIUnitTestCase
$this->forge->dropKey('forge_test_1', $index, false);
$this->forge->dropKey('forge_test_1', $uniqueIndex, false);
$this->assertEmpty($this->db->getIndexData('forge_test_1'));
$this->assertCount(0, $this->db->getIndexData('forge_test_1'));
$this->forge->dropTable('forge_test_1', true);
}
@ -1500,7 +1500,7 @@ final class ForgeTest extends CIUnitTestCase
$this->assertFalse($this->db->tableExists('dropTest'));
if ($this->db->DBDriver === 'SQLite3') {
$this->assertEmpty($this->db->getIndexData('droptest'));
$this->assertCount(0, $this->db->getIndexData('droptest'));
}
}
@ -1668,7 +1668,7 @@ final class ForgeTest extends CIUnitTestCase
$indexes = $this->db->getIndexData('forge_test_users');
$this->assertEmpty($indexes);
$this->assertCount(0, $indexes);
$this->forge->dropTable('forge_test_users', true);
}

View File

@ -58,7 +58,7 @@ final class GetTest extends CIUnitTestCase
$jobs = $this->db->table('job')->limit(0)->get()->getResult();
$this->assertEmpty($jobs);
$this->assertCount(0, $jobs);
}
public function testGetWithLimitZeroAsAll(): void

View File

@ -103,7 +103,7 @@ final class LoggerTest extends CIUnitTestCase
$logs = TestHandler::getLogs();
$this->assertEmpty($logs);
$this->assertCount(0, $logs);
}
public function testLogInterpolatesMessage(): void

View File

@ -130,7 +130,7 @@ final class FindModelTest extends LiveModelTestCase
// Binds should be reset to 0 after each one
$binds = $this->model->builder()->getBinds();
$this->assertEmpty($binds);
$this->assertCount(0, $binds);
$query = $this->model->getLastQuery();
$this->assertCount(1, $this->getPrivateProperty($query, 'binds'));

View File

@ -250,7 +250,7 @@ final class ViewTest extends CIUnitTestCase
{
// Make sure debugging is on for our view
$view = new View($this->config, $this->viewsDir, $this->loader, true);
$this->assertEmpty($view->getPerformanceData());
$this->assertCount(0, $view->getPerformanceData());
$view->setVar('testString', 'Hello World');
$expected = '<h1>Hello World</h1>';
@ -262,12 +262,12 @@ final class ViewTest extends CIUnitTestCase
{
// Make sure debugging is on for our view
$view = new View($this->config, $this->viewsDir, $this->loader, false);
$this->assertEmpty($view->getPerformanceData());
$this->assertCount(0, $view->getPerformanceData());
$view->setVar('testString', 'Hello World');
$expected = '<h1>Hello World</h1>';
$this->assertSame($expected, $view->renderString('<h1><?= $testString ?></h1>', [], true));
$this->assertEmpty($view->getPerformanceData());
$this->assertCount(0, $view->getPerformanceData());
}
public function testRenderLayoutExtendsCorrectly(): void