Skip to content

Commit

Permalink
Update Psalm version and fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 18, 2024
1 parent 57b42d4 commit ff63f10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"require-dev": {
"amphp/php-cs-fixer-config": "^2",
"phpunit/phpunit": "^9",
"psalm/phar": "^5.18"
"psalm/phar": "5.23.1"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Future/UnhandledFutureError.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public function __construct(\Throwable $previous, ?string $origin = null)
. '"; Await the Future with Future::await() before the future is destroyed or use '
. 'Future::ignore() to suppress this exception.';

if ($origin) {
if ($origin !== null) {
$message .= ' The future has been created at ' . $origin;
} else {
$message .= ' Enable assertions and set AMP_DEBUG=true in the process environment to track its origin.';
Expand Down
1 change: 1 addition & 0 deletions src/Internal/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function formatStacktrace(array $trace): string
*/
function isDebugEnabled(): bool
{
/** @psalm-suppress RiskyTruthyFalsyComparison */
$env = \getenv("AMP_DEBUG") ?: "0";
return match ($env) {
"0", "false", "off" => false,
Expand Down

0 comments on commit ff63f10

Please sign in to comment.