Skip to content

Commit

Permalink
fix Revert "refactor: re-run rector"
Browse files Browse the repository at this point in the history
This reverts commit 65b71e9.

fix: skip rector.php
  • Loading branch information
samsonasik committed Feb 11, 2025
1 parent 65b71e9 commit 1925f69
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
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;
Expand Down Expand Up @@ -168,6 +169,8 @@
NullToStrictStringFuncCallArgRector::class,

CompactToVariablesRector::class,

AssertCountWithZeroToAssertEmptyRector::class,
])
// auto import fully qualified class names
->withImportNames(removeUnusedImports: true)
Expand Down
6 changes: 3 additions & 3 deletions tests/system/Database/Live/ForgeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ public function testSetKeyNames(): void
$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);
}
Expand Down Expand Up @@ -1500,7 +1500,7 @@ public function testDropTableSuccess(): void
$this->assertFalse($this->db->tableExists('dropTest'));

if ($this->db->DBDriver === 'SQLite3') {
$this->assertEmpty($this->db->getIndexData('droptest'));
$this->assertCount(0, $this->db->getIndexData('droptest'));
}
}

Expand Down Expand Up @@ -1668,7 +1668,7 @@ public function testDropPrimaryKey(): void

$indexes = $this->db->getIndexData('forge_test_users');

$this->assertEmpty($indexes);
$this->assertCount(0, $indexes);

$this->forge->dropTable('forge_test_users', true);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Database/Live/GetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testGetWithLimitZero(): void

$jobs = $this->db->table('job')->limit(0)->get()->getResult();

$this->assertEmpty($jobs);
$this->assertCount(0, $jobs);
}

public function testGetWithLimitZeroAsAll(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Log/LoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function testLogDoesnotLogUnhandledLevels(): void

$logs = TestHandler::getLogs();

$this->assertEmpty($logs);
$this->assertCount(0, $logs);
}

public function testLogInterpolatesMessage(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Models/FindModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function testFindClearsBinds(): void

// 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'));
Expand Down
6 changes: 3 additions & 3 deletions tests/system/View/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function testPerformanceLogging(): void
{
// 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>';
Expand All @@ -262,12 +262,12 @@ public function testPerformanceNonLogging(): void
{
// 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
Expand Down

0 comments on commit 1925f69

Please sign in to comment.