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
TASK: Fix psalm errors #1937
TASK: Fix psalm errors #1937
Conversation
d6e8037
to
78afb3f
Compare
@@ -206,11 +206,12 @@ public function get(string $entryIdentifier) | |||
|
|||
$statementHandle = $this->databaseHandle->prepare('SELECT "content" FROM "' . $this->cacheTableName . '" WHERE "identifier"=? AND "context"=? AND "cache"=?' . $this->getNotExpiredStatement()); | |||
$statementHandle->execute([$entryIdentifier, $this->context(), $this->cacheIdentifier]); | |||
/** @var false|string|null $fetchedColumn */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The column content
is nullable in the schema, so this can return null.
Having to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@albe, thought the benefit of psalm is Having the baseline instead of adding annotations. Why is it needed here?
Not needed, but I think in this case it is more benefit in adding this one annotation than silencing the error. Psalm can this way detect ill-usage of We can of course baseline this case instead too. |
@albe maybe add that explanation to the commit that introduces it |
Psalm can this way detect ill-usage of Now in the places it is used, which is better than just silencing the error with a baseline update.
22705bc
to
f15b761
Compare
Done @daniellienert :) |
Make psalm happy again