Skip to content

Commit

Permalink
Merge pull request #8034 from kenjis/fix-phpstan-ci-errors
Browse files Browse the repository at this point in the history
fix: PHPStan errors
  • Loading branch information
kenjis authored Oct 12, 2023
2 parents f6ce13b + 65b01f6 commit 52dbf70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,8 @@ parameters:
booleansInConditions: true
disallowedConstructs: true
matchingInheritedMethodNames: true
ignoreErrors:
- '#^Call to function config with Config\\.+\:\:class is discouraged\.$#'
codeigniter:
additionalConfigNamespaces:
- CodeIgniter\Config\
2 changes: 1 addition & 1 deletion system/Config/Factories.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ public static function getOptions(string $component): array
// Handle Config as a special case to prevent logic loops
? self::$configOptions
// Load values from the best Factory configuration (will include Registrars)
: config(Factory::class)->{$component} ?? [];
: config('Factory')->{$component} ?? [];

// The setOptions() reset the component. So getOptions() may reset
// the component.
Expand Down

0 comments on commit 52dbf70

Please sign in to comment.