Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parameter-dependent psalm return type hint to temporal accessors
Please refer to the Psalm documentation for conditional types[^0] for more information. Although the docs specify that template parameters are required, the reference-a-variable shorthand for templates also work, see the [example]. Usually this project seems to prefer `@phpstan-`-prefixes, but this construct is currently not available to PHPstan[^1]. [^0]: https://psalm.dev/docs/annotating_code/type_syntax/conditional_types/ [^1]: phpstan/phpstan#3853 [example]: https://psalm.dev/r/11cdedd7b3
- Loading branch information