Skip to content

Commit

Permalink
ignore phpstan function not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-rolland committed Aug 31, 2022
1 parent 401323b commit 9c35fc3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/phpstan/phpstan-1.7.7.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ parameters:
- '#Access to an undefined property Module::\$installed.#'
- '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#'
- '#Function deactivate_custom_modules not found.#'
- '#Function deactivate_custom_modules80 not found.#'
- '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#'
1 change: 1 addition & 0 deletions tests/phpstan/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ parameters:
paths:
# From PHPStan 0.12, paths to check are relative to the neon file
- ./../../classes
- ./../../upgrade/php/deactivate_custom_modules.php
- ./../../AdminSelfUpgrade.php
- ./../../ajax-upgradetab.php
- ./../../ajax-upgradetabconfig.php
Expand Down
2 changes: 1 addition & 1 deletion upgrade/php/deactivate_custom_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function deactivate_custom_modules()
$nativeModules = $nativeModules->modules;
}
$arrNativeModules = [];
if (is_array($nativeModules)) {
if (!empty($nativeModules)) {
foreach ($nativeModules as $nativeModulesType) {
if (in_array($nativeModulesType['type'], ['native', 'partner'])) {
$arrNativeModules[] = '""';
Expand Down

0 comments on commit 9c35fc3

Please sign in to comment.