AlexKratky Thank you,
Internally, we do handle the conditional param type (currently, we would treat your sample as string|null
).
The highlighting is another thing; it's implemented in vscode itself (https://github.com/microsoft/vscode/blob/7d22fd919d63fb1a6dd67c4831013b8892729417/extensions/php/syntaxes/php.tmLanguage.json#L2805) which is completely incorrect. On top of this, we are providing semantic highlighting to (at least) colorize types and variables within phpdoc types correctly.
I'm afraid, that to fix the highlighting of PHPStan's conditional types, we need to create an issue or a pull request to the vscode repo.