Closed Legion112 closed 1 year ago
$this->first()
has parameters, so it's not correct to use @psalm-assert-if-true TValue $this->first()
. I've added some very basic code here: https://github.com/psalm/psalm-plugin-laravel/pull/313/files
Feel free to improve this PR and suggest more changes
Should be something like this
Also this option have to be set to support this check https://psalm.dev/docs/running_psalm/configuration/#memoizemethodcallresults https://psalm.dev/docs/annotating_code/adding_assertions/
Example from documentation: