Skip to content

Commit

Permalink
Merge pull request #4862 from samsonasik/apply-rector-r
Browse files Browse the repository at this point in the history
[Rector] Apply Rector: RemoveExtraParametersRector
  • Loading branch information
samsonasik authored Jun 23, 2021
2 parents 007c66f + 3e0c343 commit e73f750
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
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;
Expand Down Expand Up @@ -97,4 +98,5 @@
$services->set(RemoveVarTagFromClassConstantRector::class);
$services->set(AddPregQuoteDelimiterRector::class);
$services->set(SimplifyRegexPatternRector::class);
$services->set(RemoveExtraParametersRector::class);
};
2 changes: 1 addition & 1 deletion tests/system/Database/Builder/InsertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testInsertBatchThrowsExceptionOnNoData()
{
$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();
}
Expand Down
5 changes: 3 additions & 2 deletions tests/system/Database/Builder/UpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ public function testUpdateThrowsExceptionWithNoData()
{
$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()
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Helpers/URLHelper/SiteUrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,6 @@ public function testBaseURLService()
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));
}
}
2 changes: 1 addition & 1 deletion tests/system/Router/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function testClosures()
{
$router = new Router($this->collection, $this->request);

$router->handle('closure/123/alpha', $this->request);
$router->handle('closure/123/alpha');

$closure = $router->controllerName();

Expand Down

0 comments on commit e73f750

Please sign in to comment.