Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update psalm to 4.27 fixing newly discovered issues #150

Merged
merged 1 commit into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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