Skip to content

Commit

Permalink
Fix PHPStan 4267 issue until fixed officially (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek authored Dec 30, 2020
1 parent 48ca2aa commit fa5d2e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
if [ "${{ matrix.type }}" != "CodingStyle" ]; then composer remove --no-interaction --no-update friendsofphp/php-cs-fixer --dev && composer --no-interaction --no-update require jdorn/sql-formatter ; fi
if [ "${{ matrix.type }}" != "StaticAnalysis" ]; then composer remove --no-interaction --no-update phpstan/phpstan --dev ; fi
composer install --no-suggest --ansi --prefer-dist --no-interaction --no-progress --optimize-autoloader
if [ "${{ matrix.type }}" = "StaticAnalysis" ]; then git clone --depth 1 --branch 1.1.5 https://github.com/mvorisek/atk4-hintable-mirror.git && php -d phar.readonly=0 atk4-hintable-mirror/patch-phpstan-static-type-issue-4267.php vendor/phpstan/phpstan/phpstan.phar && rm -R atk4-hintable-mirror ; fi
- name: Init
run: |
Expand Down
2 changes: 1 addition & 1 deletion tests/ContainsManyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected function init(): void
$this->addCalculatedField('discounts_total_sum', function (self $m) {
$total = 0;
foreach ($m->lines as $line) {
$total += $line->total_gross * $line->get('discounts_percent') / 100; // @phpstan-ignore-line
$total += $line->total_gross * $line->get('discounts_percent') / 100;
}

return $total;
Expand Down

0 comments on commit fa5d2e7

Please sign in to comment.