PHPStorm PHPDoc - int to integer



Is there a way to configure the auto-generated phpdoc to use `integer` rather than `int` - our coding standards require `integer`




Hi there,

  1. The proposed PSR for PHPDoc lists int as allowed keyword and not integer --
  2. PSR-12 also suggests to use short int form -- (Section 2.5) and PhpStorm highlights integer & boolean and offers converting them to their short form.
  3. Actual native PHP typehints also use short int (and bool).

In any case: this WI-30774 ticket asks for such int -> integer normalizing ... but as per comment there it should actually do other way around (so it's in line with the above points).

Right now there is no such option and it's pretty unlikely that it will appear (in the way you are after).


P.S. Actually it was requested in the past and was declined : --> (to use the same what  native PHP types use)


Thanks Andriy, appreciate the detailed reply


Please sign in to leave a comment.