diff --git a/composer.json b/composer.json index 984ab2b61b54..0e9dc900332f 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "phpunit/phpcov": "^9.0.2 || ^10.0", "phpunit/phpunit": "^10.5.16 || ^11.2", "predis/predis": "^1.1 || ^2.0", - "rector/rector": "1.2.5" + "rector/rector": "1.2.6" }, "replace": { "codeigniter4/framework": "self.version" diff --git a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php index 579969346637..4c705fd439b1 100644 --- a/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php +++ b/system/Commands/Utilities/Routes/AutoRouterImproved/AutoRouteCollector.php @@ -36,7 +36,7 @@ public function __construct( private readonly string $defaultMethod, private readonly array $httpMethods, private readonly array $protectedControllers, - private string $prefix = '' + private readonly string $prefix = '' ) { } diff --git a/system/Encryption/Handlers/SodiumHandler.php b/system/Encryption/Handlers/SodiumHandler.php index b6c74da76581..c74f2a5f0a48 100644 --- a/system/Encryption/Handlers/SodiumHandler.php +++ b/system/Encryption/Handlers/SodiumHandler.php @@ -26,7 +26,7 @@ class SodiumHandler extends BaseHandler /** * Starter key * - * @var string + * @var string|null Null is used for buffer cleanup. */ protected $key = ''; diff --git a/system/HTTP/SiteURI.php b/system/HTTP/SiteURI.php index 20bec2972122..9931b1cc10c4 100644 --- a/system/HTTP/SiteURI.php +++ b/system/HTTP/SiteURI.php @@ -41,7 +41,7 @@ class SiteURI extends URI /** * The Index File. */ - private string $indexPage; + private readonly string $indexPage; /** * List of URI segments in baseURL and indexPage. diff --git a/system/Router/RouteCollection.php b/system/Router/RouteCollection.php index c5e13fc3e4dc..ece81113742e 100644 --- a/system/Router/RouteCollection.php +++ b/system/Router/RouteCollection.php @@ -1611,7 +1611,7 @@ private function processArrayCallableSyntax(string $from, array $to): string private function getMethodParams(string $from): string { preg_match_all('/\(.+?\)/', $from, $matches); - $count = is_countable($matches[0]) ? count($matches[0]) : 0; + $count = count($matches[0]); $params = ''; diff --git a/user_guide_src/source/concepts/factories.rst b/user_guide_src/source/concepts/factories.rst index f98fd1726e38..aaf7df459c6d 100644 --- a/user_guide_src/source/concepts/factories.rst +++ b/user_guide_src/source/concepts/factories.rst @@ -334,14 +334,14 @@ Set the following property to ``true`` in **app/Config/Optimize.php**:: public bool $configCacheEnabled = true; -Since v4.5.0, you can enable this with the ``spark optimize`` command. +Or you can enable this with the ``spark optimize`` command. .. note:: This property cannot be overridden by :ref:`environment variables `. .. note:: - Prior to v4.5.0, uncomment the following code in **public/index.php**:: + In v4.4.x, uncomment the following code in **public/index.php**:: --- a/public/index.php +++ b/public/index.php