Skip to content

Commit 0b0126c

Browse files
authored
Merge pull request #9314 from paulbalandan/rename-controller-to-Controller
refactor: rename `controller` to `Controller`
2 parents f5200b5 + 562ddf2 commit 0b0126c

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16549,12 +16549,6 @@
1654916549
'count' => 2,
1655016550
'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php',
1655116551
];
16552-
$ignoreErrors[] = [
16553-
// identifier: class.nameCase
16554-
'message' => '#^Class CodeIgniter\\\\Controller referenced with incorrect case\\: CodeIgniter\\\\controller\\.$#',
16555-
'count' => 2,
16556-
'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php',
16557-
];
1655816552
$ignoreErrors[] = [
1655916553
// identifier: missingType.return
1656016554
'message' => '#^Method CodeIgniter\\\\Router\\\\RouteCollectionTest\\:\\:getCollector\\(\\) has no return type specified\\.$#',

tests/system/Router/RouteCollectionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
namespace CodeIgniter\Router;
1515

1616
use App\Controllers\Product;
17-
use CodeIgniter\controller;
17+
use CodeIgniter\Controller;
1818
use CodeIgniter\Exceptions\PageNotFoundException;
1919
use CodeIgniter\HTTP\Method;
2020
use CodeIgniter\Test\CIUnitTestCase;
@@ -243,10 +243,10 @@ public function testAddRecognizesCustomNamespaces(): void
243243
$routes = $this->getCollector();
244244
$routes->setDefaultNamespace('\CodeIgniter');
245245

246-
$routes->add('home', 'controller');
246+
$routes->add('home', 'Controller');
247247

248248
$expects = [
249-
'home' => '\\' . controller::class,
249+
'home' => '\\' . Controller::class,
250250
];
251251

252252
$routes = $routes->getRoutes();

0 commit comments

Comments
 (0)