Skip to content

Commit

Permalink
Fixed PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Apr 2, 2021
1 parent b71119b commit 17cd250
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.2', '1.7.6.9', '1.7.7.3', 'latest']
presta-versions: ['1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6.9', '1.7.7.3', 'latest']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion ps_featuredproducts.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function getContent()
if (!Validate::isBool($rand)) {
$errors[] = $this->trans('Invalid value for the "randomize" flag.', [], 'Modules.Featuredproducts.Admin');
}
if (isset($errors) && count($errors)) {
if (count($errors)) {
$output = $this->displayError(implode('<br />', $errors));
} else {
Configuration::updateValue('HOME_FEATURED_NBR', (int) $nbr);
Expand Down
Empty file modified tests/phpstan.sh
100644 → 100755
Empty file.
7 changes: 6 additions & 1 deletion tests/phpstan/phpstan-1.7.1.2.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
includes:
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon

parameters:
ignoreErrors:
- '#Call to method assign\(\) on an unknown class Smarty_Data#'
- '#Parameter \#1 \$idCategory of class Category constructor expects null, int given#'
7 changes: 6 additions & 1 deletion tests/phpstan/phpstan-1.7.2.5.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
includes:
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon

parameters:
ignoreErrors:
- '#Call to method assign\(\) on an unknown class Smarty_Data#'
- '#Parameter \#1 \$idCategory of class Category constructor expects null, int given#'
6 changes: 5 additions & 1 deletion tests/phpstan/phpstan-1.7.4.4.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
includes:
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon

parameters:
ignoreErrors:
- '#Parameter \#1 \$idCategory of class Category constructor expects null, int given#'
6 changes: 6 additions & 0 deletions tests/phpstan/phpstan-1.7.5.1.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
includes:
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon

parameters:
ignoreErrors:
- '#Parameter \#1 \$idCategory of class Category constructor expects null, int given#'
2 changes: 0 additions & 2 deletions tests/phpstan/phpstan-1.7.5.2.neon

This file was deleted.

6 changes: 5 additions & 1 deletion tests/phpstan/phpstan-1.7.6.9.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
includes:
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon
- %currentWorkingDirectory%/tests/phpstan/phpstan.neon

parameters:
ignoreErrors:
- '#Parameter \#1 \$idCategory of class Category constructor expects null, int given#'

0 comments on commit 17cd250

Please sign in to comment.