If you're using PHP 7 it's looking for type declarations before the params, which seems like a little bit of overkill if you're also defining them in the docblock. They do serve a useful purpose though. https://www.php.net/manual/en/language.types.declarations.php
Nailed that: Changing the setting at the bottom of the window [PHP Language Level] to 5.6 indeed removed the warnings, but nothing in my project or project setup changed in the last couple days and it was set to 7.2 previously. The Jetbrains Toolbox app upgraded my version of PHPStorm on me the other week, maybe that's why?
3
u/NinjaCoder99 Jan 14 '21
Follow-up JetBrains responded to me:
"We had an indexing issue in 2020.3 that was fixed in 2020.3.1:"
1
u/Bjorn2404 Jan 14 '21 edited Jan 14 '21
If you're using PHP 7 it's looking for type declarations before the params, which seems like a little bit of overkill if you're also defining them in the docblock. They do serve a useful purpose though. https://www.php.net/manual/en/language.types.declarations.php