@@ -31,15 +31,15 @@ class Factories
3131 * Store of component-specific options, usually
3232 * from CodeIgniter\Config\Factory.
3333 *
34- * @var array<string, array>
34+ * @var array<string, array<string, bool|string|null> >
3535 */
3636 protected static $ options = [];
3737
3838 /**
3939 * Explicit options for the Config
4040 * component to prevent logic loops.
4141 *
42- * @var array<string, mixed >
42+ * @var array<string, bool|string|null >
4343 */
4444 private static array $ configOptions = [
4545 'component ' => 'config ' ,
@@ -53,7 +53,8 @@ class Factories
5353 * Mapping of class basenames (no namespace) to
5454 * their instances.
5555 *
56- * @var array<string, string[]>
56+ * @var array<string, array<string, string>>
57+ * @phpstan-var array<string, array<string, class-string>>
5758 */
5859 protected static $ basenames = [];
5960
@@ -63,7 +64,8 @@ class Factories
6364 * A multi-dimensional array with components as
6465 * keys to the array of name-indexed instances.
6566 *
66- * @var array<string, array>
67+ * @var array<string, array<string, object>>
68+ * @phpstan-var array<string, array<class-string, object>>
6769 */
6870 protected static $ instances = [];
6971
@@ -74,9 +76,10 @@ class Factories
7476 *
7577 * @template T of Model
7678 *
77- * @param class-string<T> $name
79+ * @phpstan- param class-string<T> $name
7880 *
79- * @return T
81+ * @return Model
82+ * @phpstan-return T
8083 */
8184 public static function models (string $ name , array $ options = [], ?ConnectionInterface &$ conn = null )
8285 {
@@ -228,7 +231,7 @@ protected static function verifyInstanceOf(array $options, string $name): bool
228231 *
229232 * @param string $component Lowercase, plural component name
230233 *
231- * @return array<string, mixed >
234+ * @return array<string, bool|string|null >
232235 */
233236 public static function getOptions (string $ component ): array
234237 {
@@ -253,7 +256,7 @@ public static function getOptions(string $component): array
253256 *
254257 * @param string $component Lowercase, plural component name
255258 *
256- * @return array<string, mixed > The result after applying defaults and normalization
259+ * @return array<string, bool|string|null > The result after applying defaults and normalization
257260 */
258261 public static function setOptions (string $ component , array $ values ): array
259262 {
0 commit comments