Use PHP 7.4 type hints
kdebisschop opened this issue · 1 comments
This is for the 2.x branch/release. PR will be added shortly.
The work will replace PHPdoc annotations for type with PHP 7.4 property annotations. This is a compatibility-breaking change.
Though we don't have a published code style guide, previous conversations have suggested our desire is to avoid duplications and excess code that do carry information. So I've removed or streamlined parameter comments where appropriate (i.e., most parameters need no doc or only a single line.
Also, in a few places, methods can use @inheritdoc -- I do so when the existing comment just parrots the parent's doc (note: All this plays nicely with phpDocumentor. It seems that using @inheritdoc for inherited properties does not, so I have left comments there even if they are largely redundant.
Also, since our php_cs_fixer profile uses symfony, and since most of our variables are in camelCase, I refactored the handful of variables in snake_case so the project would be consistent overall.
In the absence of a formal style guide, I am definitely making assumptions about what our desired style looks like. As I result, I expect and welcome comment.
I'm going to modify above - Symfony says "do not inline PHPdoc" so I'm going to update the patch to follow that, since Symfony seems to be our de-facto standard.