Skip to content

Commit 94f8aa7

Browse files
committed
fix: Config property type
All atomic type properties in Config classes have been typed in 4.3.
1 parent feb1772 commit 94f8aa7

10 files changed

Lines changed: 11 additions & 13 deletions

File tree

app/Config/App.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,9 @@ class App extends BaseConfig
148148
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
149149
* - `CodeIgniter\Session\Handlers\RedisHandler`
150150
*
151-
* @var string
152-
*
153151
* @deprecated use Config\Session::$driver instead.
154152
*/
155-
public $sessionDriver = FileHandler::class;
153+
public string $sessionDriver = FileHandler::class;
156154

157155
/**
158156
* --------------------------------------------------------------------------
@@ -345,7 +343,7 @@ class App extends BaseConfig
345343
*
346344
* @var array<string, string>
347345
*/
348-
public $proxyIPs = [];
346+
public array $proxyIPs = [];
349347

350348
/**
351349
* --------------------------------------------------------------------------

system/Test/Mock/MockAppConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MockAppConfig extends App
2323
public bool $cookieSecure = false;
2424
public bool $cookieHTTPOnly = false;
2525
public ?string $cookieSameSite = 'Lax';
26-
public $proxyIPs = [];
26+
public array $proxyIPs = [];
2727
public string $CSRFTokenName = 'csrf_test_name';
2828
public string $CSRFHeaderName = 'X-CSRF-TOKEN';
2929
public string $CSRFCookieName = 'csrf_cookie_name';

system/Test/Mock/MockCLIConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MockCLIConfig extends App
2323
public bool $cookieSecure = false;
2424
public bool $cookieHTTPOnly = false;
2525
public ?string $cookieSameSite = 'Lax';
26-
public $proxyIPs = [];
26+
public array $proxyIPs = [];
2727
public string $CSRFTokenName = 'csrf_test_name';
2828
public string $CSRFCookieName = 'csrf_cookie_name';
2929
public int $CSRFExpire = 7200;

user_guide_src/source/installation/troubleshooting/001.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class App extends BaseConfig
88
{
99
// ...
1010

11-
public $indexPage = 'index.php';
11+
public string $indexPage = 'index.php';
1212

1313
// ...
1414
}

user_guide_src/source/installation/troubleshooting/002.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class App extends BaseConfig
88
{
99
// ...
1010

11-
public $indexPage = 'index.php?';
11+
public string $indexPage = 'index.php?';
1212

1313
// ...
1414
}

user_guide_src/source/installation/upgrade_localization/001.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class App extends BaseConfig
88
{
99
// ...
1010

11-
public $defaultLocale = 'en';
11+
public string $defaultLocale = 'en';
1212

1313
// ...
1414
}

user_guide_src/source/outgoing/localization/001.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class App extends BaseConfig
88
{
9-
public $defaultLocale = 'en';
9+
public string $defaultLocale = 'en';
1010

1111
// ...
1212
}

user_guide_src/source/outgoing/localization/002.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class App extends BaseConfig
88
{
9-
public $negotiateLocale = true;
9+
public bool $negotiateLocale = true;
1010

1111
// ...
1212
}

user_guide_src/source/outgoing/localization/003.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class App extends BaseConfig
88
{
9-
public $supportedLocales = ['en', 'es', 'fr-FR'];
9+
public array $supportedLocales = ['en', 'es', 'fr-FR'];
1010

1111
// ...
1212
}

user_guide_src/source/outgoing/response/011.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class App extends BaseConfig
88
{
9-
public $CSPEnabled = true;
9+
public bool $CSPEnabled = true;
1010

1111
// ...
1212
}

0 commit comments

Comments
 (0)