Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved types around
getenv()
and implicit false
casts
Fixes: ``` ERROR: RiskyTruthyFalsyComparison at src/DocbookPage.php:76:13 Operand of type false|non-empty-string contains type non-empty-string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356) if (! $firstLine || ! str_starts_with($firstLine, '<h1>') || ! str_ends_with($firstLine, '</h1>')) { ERROR: RiskyTruthyFalsyComparison at src/Environment.php:30:16 Operand of type false|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356) return getenv($name) ?: null; ```
- Loading branch information