2828 * @method static Model|null models(string $alias, array $options = [], ?ConnectionInterface &$conn = null)
2929 * @see \CodeIgniter\Config\FactoriesTest
3030 */
31- class Factories
31+ final class Factories
3232{
3333 /**
3434 * Store of component-specific options, usually
3535 * from CodeIgniter\Config\Factory.
3636 *
3737 * @var array<string, array<string, bool|string|null>>
3838 */
39- protected static $ options = [];
39+ private static $ options = [];
4040
4141 /**
4242 * Explicit options for the Config
@@ -65,7 +65,7 @@ class Factories
6565 * @var array<string, array<string, string>>
6666 * @phpstan-var array<string, array<string, class-string>>
6767 */
68- protected static $ aliases = [];
68+ private static $ aliases = [];
6969
7070 /**
7171 * Store for instances of any component that
@@ -79,7 +79,7 @@ class Factories
7979 * @var array<string, array<string, object>>
8080 * @phpstan-var array<string, array<class-string, object>>
8181 */
82- protected static $ instances = [];
82+ private static $ instances = [];
8383
8484 /**
8585 * Whether the component instances are updated?
@@ -88,7 +88,7 @@ class Factories
8888 *
8989 * @internal For caching only
9090 */
91- protected static $ updated = [];
91+ private static $ updated = [];
9292
9393 /**
9494 * Define the class to load. You can *override* the concrete class.
@@ -252,7 +252,7 @@ private static function isConfig(string $component): bool
252252 * @param array $options The array of component-specific directives
253253 * @param string $alias Class alias. See the $aliases property.
254254 */
255- protected static function locateClass (array $ options , string $ alias ): ?string
255+ private static function locateClass (array $ options , string $ alias ): ?string
256256 {
257257 // Check for low-hanging fruit
258258 if (
@@ -328,7 +328,7 @@ private static function isNamespaced(string $alias): bool
328328 * @param array $options The array of component-specific directives
329329 * @param string $alias Class alias. See the $aliases property.
330330 */
331- protected static function verifyPreferApp (array $ options , string $ alias ): bool
331+ private static function verifyPreferApp (array $ options , string $ alias ): bool
332332 {
333333 // Anything without that restriction passes
334334 if (! $ options ['preferApp ' ]) {
@@ -349,7 +349,7 @@ protected static function verifyPreferApp(array $options, string $alias): bool
349349 * @param array $options The array of component-specific directives
350350 * @param string $alias Class alias. See the $aliases property.
351351 */
352- protected static function verifyInstanceOf (array $ options , string $ alias ): bool
352+ private static function verifyInstanceOf (array $ options , string $ alias ): bool
353353 {
354354 // Anything without that restriction passes
355355 if (! $ options ['instanceOf ' ]) {
0 commit comments