Skip to content

Commit 562ddf2

Browse files
committed
refactor: rename controller to Controller
1 parent 8fc60e7 commit 562ddf2

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

Diff for: phpstan-baseline.php

-6
Original file line numberDiff line numberDiff line change
@@ -16573,12 +16573,6 @@
1657316573
'count' => 2,
1657416574
'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php',
1657516575
];
16576-
$ignoreErrors[] = [
16577-
// identifier: class.nameCase
16578-
'message' => '#^Class CodeIgniter\\\\Controller referenced with incorrect case\\: CodeIgniter\\\\controller\\.$#',
16579-
'count' => 2,
16580-
'path' => __DIR__ . '/tests/system/Router/RouteCollectionTest.php',
16581-
];
1658216576
$ignoreErrors[] = [
1658316577
// identifier: missingType.return
1658416578
'message' => '#^Method CodeIgniter\\\\Router\\\\RouteCollectionTest\\:\\:getCollector\\(\\) has no return type specified\\.$#',

Diff for: tests/system/Router/RouteCollectionTest.php

+3-3
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)