Skip to content

Commit ff63f10

Browse files
committed
Update Psalm version and fix issues
1 parent 57b42d4 commit ff63f10

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"require-dev": {
4040
"amphp/php-cs-fixer-config": "^2",
4141
"phpunit/phpunit": "^9",
42-
"psalm/phar": "^5.18"
42+
"psalm/phar": "5.23.1"
4343
},
4444
"autoload": {
4545
"psr-4": {

src/Future/UnhandledFutureError.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function __construct(\Throwable $previous, ?string $origin = null)
1313
. '"; Await the Future with Future::await() before the future is destroyed or use '
1414
. 'Future::ignore() to suppress this exception.';
1515

16-
if ($origin) {
16+
if ($origin !== null) {
1717
$message .= ' The future has been created at ' . $origin;
1818
} else {
1919
$message .= ' Enable assertions and set AMP_DEBUG=true in the process environment to track its origin.';

src/Internal/functions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ function formatStacktrace(array $trace): string
4444
*/
4545
function isDebugEnabled(): bool
4646
{
47+
/** @psalm-suppress RiskyTruthyFalsyComparison */
4748
$env = \getenv("AMP_DEBUG") ?: "0";
4849
return match ($env) {
4950
"0", "false", "off" => false,

0 commit comments

Comments
 (0)