2

I'm developing a Laravel application, and I use PHPCS, PHPMD and Prettier.

I have a Facade to deal with the invitation system of the app, and the PHPDoc (at the time of writing) looks like this:

/**
 * ...
 * @method  array  getValidationRules()  Return the validation rules.
 * @method  \App\Model\Invite  check(string $code)   Return the invite if it exists and is valid.
 * @method  \App\Model\Invite  claim(\App\Model\Invite $invite, \App\Model\User $claimerUser)  Claim the invite.
 * @method  \App\Model\Invite|null  find(string $inviteCode)  Find the invitation if it exists.
 * ...
 */

I'd prefer align vertically the PHPDoc items, but the PHPCS/PHPMD complains about the print width (that is 120 characters).

Is better put the documentation in a new line and break the lines whenever the line hits 120 chars our ignore the warning?

How you are dealing with this?

greeflas
  • 825
  • 1
  • 8
  • 20
glaucomorais
  • 317
  • 3
  • 9

0 Answers0