[Rector] Apply Rector: RemoveExtraParametersRector

This commit is contained in:
Abdul Malik Ikhsan 2021-06-23 08:19:54 +07:00
parent 007c66ff58
commit 3e0c3436d2
No known key found for this signature in database
GPG Key ID: 69AC5BC354C89BE6
5 changed files with 8 additions and 5 deletions

View File

@ -26,6 +26,7 @@ use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector;
use Rector\Php70\Rector\Ternary\TernaryToNullCoalescingRector;
use Rector\Php71\Rector\FuncCall\RemoveExtraParametersRector;
use Rector\Php71\Rector\List_\ListToArrayDestructRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Php73\Rector\FuncCall\StringifyStrNeedlesRector;
@ -97,4 +98,5 @@ return static function (ContainerConfigurator $containerConfigurator): void {
$services->set(RemoveVarTagFromClassConstantRector::class);
$services->set(AddPregQuoteDelimiterRector::class);
$services->set(SimplifyRegexPatternRector::class);
$services->set(RemoveExtraParametersRector::class);
};

View File

@ -117,7 +117,7 @@ class InsertTest extends CIUnitTestCase
{
$builder = $this->db->table('jobs');
$this->expectException('\CodeIgniter\Database\Exceptions\DatabaseException', 'You must use the "set" method to update an entry.');
$this->expectException('\CodeIgniter\Database\Exceptions\DatabaseException');
$this->expectExceptionMessage('You must use the "set" method to update an entry.');
$builder->insertBatch();
}

View File

@ -91,9 +91,10 @@ class UpdateTest extends CIUnitTestCase
{
$builder = new BaseBuilder('jobs', $this->db);
$this->expectException('CodeIgniter\Database\Exceptions\DatabaseException', 'You must use the "set" method to update an entry.');
$this->expectException('CodeIgniter\Database\Exceptions\DatabaseException');
$this->expectExceptionMessage('You must use the "set" method to update an entry.');
$builder->update(null, null, null, true);
$builder->update(null, null, null);
}
public function testUpdateBatch()

View File

@ -266,6 +266,6 @@ final class SiteUrlTest extends CIUnitTestCase
Services::injectMock('request', $request);
$this->assertEquals('http://example.com/ci/v4/index.php/controller/method', site_url('controller/method', null, $this->config));
$this->assertEquals('http://example.com/ci/v4/controller/method', base_url('controller/method', null, $this->config));
$this->assertEquals('http://example.com/ci/v4/controller/method', base_url('controller/method', null));
}
}

View File

@ -181,7 +181,7 @@ class RouterTest extends CIUnitTestCase
{
$router = new Router($this->collection, $this->request);
$router->handle('closure/123/alpha', $this->request);
$router->handle('closure/123/alpha');
$closure = $router->controllerName();