@@ -31,15 +31,16 @@ class Factories
3131 * Store of component-specific options, usually
3232 * from CodeIgniter\Config\Factory.
3333 *
34- * @var array<string, array>
34+ * @var array[]
35+ * @phpstan-var array<string, array<string, string|bool|null>>
3536 */
3637 protected static $ options = [];
3738
3839 /**
3940 * Explicit options for the Config
4041 * component to prevent logic loops.
4142 *
42- * @var array<string, mixed >
43+ * @phpstan- var array<string, string|bool|null >
4344 */
4445 private static array $ configOptions = [
4546 'component ' => 'config ' ,
@@ -53,7 +54,8 @@ class Factories
5354 * Mapping of class basenames (no namespace) to
5455 * their instances.
5556 *
56- * @var array<string, string[]>
57+ * @var array[]
58+ * @phpstan-var array<string, array<string, class-string>>
5759 */
5860 protected static $ basenames = [];
5961
@@ -63,7 +65,8 @@ class Factories
6365 * A multi-dimensional array with components as
6466 * keys to the array of name-indexed instances.
6567 *
66- * @var array<string, array>
68+ * @var array[]
69+ * @phpstan-var array<string, array<class-string, object>>
6770 */
6871 protected static $ instances = [];
6972
@@ -74,9 +77,10 @@ class Factories
7477 *
7578 * @template T of Model
7679 *
77- * @param class-string<T> $name
80+ * @phpstan- param class-string<T> $name
7881 *
79- * @return T
82+ * @return object
83+ * @phpstan-return T
8084 */
8185 public static function models (string $ name , array $ options = [], ?ConnectionInterface &$ conn = null )
8286 {
@@ -228,7 +232,7 @@ protected static function verifyInstanceOf(array $options, string $name): bool
228232 *
229233 * @param string $component Lowercase, plural component name
230234 *
231- * @return array<string, mixed >
235+ * @phpstan- return array<string, string|null|bool >
232236 */
233237 public static function getOptions (string $ component ): array
234238 {
@@ -253,7 +257,8 @@ public static function getOptions(string $component): array
253257 *
254258 * @param string $component Lowercase, plural component name
255259 *
256- * @return array<string, mixed> The result after applying defaults and normalization
260+ * @return array The result after applying defaults and normalization
261+ * @phpstan-return array<string, string|null|bool>
257262 */
258263 public static function setOptions (string $ component , array $ values ): array
259264 {
0 commit comments