Inspectopedia Help

Order of modifiers

Reports visibility modifiers that are specified in the incorrect order.

According to PSR-12, the correct order is as follows:

  • When present, the abstract and final declarations MUST precede the visibility declaration.

  • When present, the static declaration MUST come after the visibility declaration.

See PSR-12: Extended Coding Style ( for details.

Inspection Details

Available in:

PhpStorm 2023.3, Qodana for PHP 2023.3



Last modified: 13 July 2023