Skip to content

Commit

Permalink
Merge pull request #150 from gsteel/psalm-4.27
Browse files Browse the repository at this point in the history
Update psalm to 4.27 fixing newly discovered issues
  • Loading branch information
Ocramius committed Sep 13, 2022
2 parents 115b6f9 + 3dce466 commit f2ad7de
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 57 deletions.
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@
},
"require-dev": {
"laminas/laminas-coding-standard": "^2.4.0",
"laminas/laminas-db": "^2.7",
"laminas/laminas-filter": "^2.14.0",
"laminas/laminas-http": "^2.14.2",
"laminas/laminas-i18n": "^2.15.0",
"laminas/laminas-session": "^2.12.1",
"laminas/laminas-db": "^2.15.0",
"laminas/laminas-filter": "^2.18.0",
"laminas/laminas-http": "^2.16.0",
"laminas/laminas-i18n": "^2.17.0",
"laminas/laminas-session": "^2.13.0",
"laminas/laminas-uri": "^2.9.1",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5.21",
"phpunit/phpunit": "^9.5.24",
"psalm/plugin-phpunit": "^0.17.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0",
"vimeo/psalm": "^4.24.0"
"vimeo/psalm": "^4.27.0"
},
"suggest": {
"laminas/laminas-db": "Laminas\\Db component, required by the (No)RecordExists validator",
Expand Down
100 changes: 50 additions & 50 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/DateStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use function array_count_values;
use function array_map;
use function array_shift;
use function assert;
use function ceil;
use function date_default_timezone_get;
use function explode;
Expand Down Expand Up @@ -408,6 +409,7 @@ private function fallbackIncrementalIterationLogic(
} else {
$baseDate = $baseDate->sub($minimumInterval);
}
assert($baseDate !== false);
}

while (
Expand All @@ -420,6 +422,8 @@ private function fallbackIncrementalIterationLogic(
$baseDate = $baseDate->sub($step);
}

assert($baseDate !== false);

// phpcs:ignore SlevomatCodingStandard.Operators.DisallowEqualOperators.DisallowedEqualOperator
if ($baseDate == $valueDate) {
return true;
Expand Down

0 comments on commit f2ad7de

Please sign in to comment.