Skip to content

Commit 34629d9

Browse files
committed
Fixed PHPStan
1 parent f1c49fe commit 34629d9

11 files changed

Lines changed: 33 additions & 8 deletions

classes/Handler/ModuleHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function isModuleEnabled($moduleName)
3333
{
3434
$module = Module::getInstanceByName($moduleName);
3535

36-
if (false === $module) {
36+
if (!($module instanceof Module)) {
3737
return false;
3838
}
3939

@@ -78,7 +78,7 @@ public function uninstallModule($moduleName)
7878

7979
$oldModule = Module::getInstanceByName($moduleName);
8080

81-
if (false === $oldModule) {
81+
if (!($oldModule instanceof Module)) {
8282
return false;
8383
}
8484

tests/phpstan/phpstan-1.6.1.18.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ includes:
33

44
parameters:
55
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.1.2.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
33

44
parameters:
5-
ignoreErrors:
6-
- '#Call to method assign\(\) on an unknown class Smarty_Data.#'
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.2.5.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
33

44
parameters:
5-
ignoreErrors:
6-
- '#Call to method assign\(\) on an unknown class Smarty_Data.#'
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.3.4.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
33

44
parameters:
5-
ignoreErrors:
6-
- '#Call to method assign\(\) on an unknown class Smarty_Data.#'
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.4.4.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
3+
4+
parameters:
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.5.1.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
3+
4+
parameters:
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.6.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
3+
4+
parameters:
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.7.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
3+
4+
parameters:
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

tests/phpstan/phpstan-1.7.8.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
includes:
22
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
3+
4+
parameters:
5+
ignoreErrors:
6+
- '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#'

0 commit comments

Comments
 (0)