Skip to content

Commit 0faf478

Browse files
committed
refactor: remove unneeded isset($config['except']
To fix PHPStan error: Error: Offset 'except' on array in isset() always exists and is not nullable. ------ -------------------------------------------------------------- Line src/Auth.php ------ -------------------------------------------------------------- 109 Offset 'except' on array in isset() always exists and is not nullable. ------ --------------------------------------------------------------
1 parent 300e9b4 commit 0faf478

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function routes(RouteCollection &$routes, array $config = []): void
106106

107107
$routes->group('/', ['namespace' => 'CodeIgniter\Shield\Controllers'], static function (RouteCollection $routes) use ($authRoutes, $config): void {
108108
foreach ($authRoutes as $name => $row) {
109-
if (! isset($config['except']) || (isset($config['except']) && ! in_array($name, $config['except'], true))) {
109+
if (! isset($config['except']) || ! in_array($name, $config['except'], true)) {
110110
foreach ($row as $params) {
111111
$options = isset($params[3])
112112
? ['as' => $params[3]]

0 commit comments

Comments
 (0)