mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Pete Walker
a3bdf1ba8c
feat: Handle native intersection types
Adds native intersection type handling to psalm, removing the previous `UnexpectedValueException`. Where an intersection is found in the parse tree, the types are resolved using the existing `Type::intersectUnionTypes` function, which I assume is being used when they're encountered in the existing docblock annotations. I've added a handful of tests to cover this, but they're certainly not exhaustive. Are there any specific edge cases I should target? This change feels way too simple... so apologies if I've missed something fundamental..!
…
…
…
Psalm
Psalm is a static analysis tool for finding errors in PHP applications.
Installation
To get started, check out the installation guide.
Live Demo
You can play around with Psalm on its website.
Documentation
Documentation is available on Psalm’s website, generated from the docs folder.
Interested in contributing?
Have a look at CONTRIBUTING.md.
Who made this
Built by Matt Brown (@muglug).
Maintained by Orklah (@orklah) and Bruce Weirdan (@weirdan).
The engineering team at Vimeo have provided a lot encouragement, especially @nbeliard, @erunion and @nickyr.
Languages
PHP
100%