From ca13b97df73c69d95e814eabcb1235e9a1d362bb Mon Sep 17 00:00:00 2001
From: "John Paul E. Balandan, CPA" <paulbalandan@gmail.com>
Date: Fri, 27 Oct 2023 23:29:18 +0800
Subject: [PATCH] fix: add correct array signatures for Modules

---
 app/Config/Modules.php     | 4 ++--
 phpstan-baseline.php       | 5 -----
 system/Modules/Modules.php | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/app/Config/Modules.php b/app/Config/Modules.php
index f84580c856d3..8d4bf56544b0 100644
--- a/app/Config/Modules.php
+++ b/app/Config/Modules.php
@@ -58,7 +58,7 @@ class Modules extends BaseModules
      *       ],
      *   ]
      *
-     * @var array
+     * @var array{only?: list<string>, exclude?: list<string>}
      */
     public $composerPackages = [];
 
@@ -72,7 +72,7 @@ class Modules extends BaseModules
      *
      * If it is not listed, only the base application elements will be used.
      *
-     * @var string[]
+     * @var list<string>
      */
     public $aliases = [
         'events',
diff --git a/phpstan-baseline.php b/phpstan-baseline.php
index cfde40738834..34add57538ac 100644
--- a/phpstan-baseline.php
+++ b/phpstan-baseline.php
@@ -1,11 +1,6 @@
 <?php declare(strict_types = 1);
 
 $ignoreErrors = [];
-$ignoreErrors[] = [
-	'message' => '#^PHPDoc type array\\<string\\> of property Config\\\\Modules\\:\\:\\$aliases is not the same as PHPDoc type array of overridden property CodeIgniter\\\\Modules\\\\Modules\\:\\:\\$aliases\\.$#',
-	'count' => 1,
-	'path' => __DIR__ . '/app/Config/Modules.php',
-];
 $ignoreErrors[] = [
 	'message' => '#^PHPDoc type CodeIgniter\\\\HTTP\\\\CLIRequest\\|CodeIgniter\\\\HTTP\\\\IncomingRequest of property App\\\\Controllers\\\\BaseController\\:\\:\\$request is not the same as PHPDoc type CodeIgniter\\\\HTTP\\\\RequestInterface of overridden property CodeIgniter\\\\Controller\\:\\:\\$request\\.$#',
 	'count' => 1,
diff --git a/system/Modules/Modules.php b/system/Modules/Modules.php
index f99e7215e733..e17b9f3c2415 100644
--- a/system/Modules/Modules.php
+++ b/system/Modules/Modules.php
@@ -37,7 +37,7 @@ class Modules
     /**
      * Auto-Discover Rules Handler
      *
-     * @var array
+     * @var list<string>
      */
     public $aliases = [];