mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
Merge pull request #4862 from samsonasik/apply-rector-r
[Rector] Apply Rector: RemoveExtraParametersRector
This commit is contained in:
commit
e73f750f22
@ -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);
|
||||
};
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user