Open aik099 opened 10 years ago
Ensure that keywords abstract, final, static, public/protected/private are used in following order:
abstract
final
static
public/protected/private
[abstract] [final] public/protected/private [static]
This applies to classes, traits, methods and class/trait properties.
Error message from PHP-CS-Fixer: Visibility MUST be declared on all properties and methods; abstract and final MUST be declared before the visibility; static MUST be declared after the visibility. (see https://github.com/fabpot/PHP-CS-Fixer/blob/54b01c018bffe3ed20d1e138f2bc885597c59f50/Symfony/CS/Fixer/PSR2/VisibilityFixer.php).
Visibility MUST be declared on all properties and methods; abstract and final MUST be declared before the visibility; static MUST be declared after the visibility.
I think there are sniffs already that checks for private/protected/public presence, so here we just need to assert their order.
Ensure that keywords
abstract
,final
,static
,public/protected/private
are used in following order:This applies to classes, traits, methods and class/trait properties.
Error message from PHP-CS-Fixer:
Visibility MUST be declared on all properties and methods; abstract and final MUST be declared before the visibility; static MUST be declared after the visibility.
(see https://github.com/fabpot/PHP-CS-Fixer/blob/54b01c018bffe3ed20d1e138f2bc885597c59f50/Symfony/CS/Fixer/PSR2/VisibilityFixer.php).I think there are sniffs already that checks for private/protected/public presence, so here we just need to assert their order.