crazyfactory / php-sniffs

0 stars 0 forks source link

Should we enforce function docblock ? #27

Open turbo8p opened 7 years ago

turbo8p commented 7 years ago

Most of the time when introducing new functions, I forget to put the docblock and will notice this once someone review my code.

Is it too strict to enforce function docblock ? If not then we should do this so that we do not forget to put it.

turbo8p commented 7 years ago

@wmathes @adhocore @Solomonic @cyberhck @dacgray @konthornR

cyberhck commented 7 years ago

I actually don't have any problems with no docblock IF we have parameter type and return type hinting, BUT if we don't have type hinting, we need docblock, is there a conditional rule?

If we do enforce, and parameter have type hints, PhpStorm can automatically generate those docblocks :)

wmathes commented 7 years ago

I like that, but right now there are lots of areas without it and this will block us from release for a while.

we can add it the Sniff, but don't enforce it yet... So we can play around with it locally first

wmathes commented 7 years ago

Missing docblocks (methods, functions and fields):

adhocore commented 7 years ago

docblocks are great to have and is recommended but lets not force while we still have legacy code floating around however if there is any docblock then it should be proper