HomePhabricator

Add a linter rule for modifier ordering

Description

Add a linter rule for modifier ordering

Summary: Fixes T7417. Adds ArcanistXHPASTLinter::LINT_MODIFIER_ORDERING for ensuring that method/property modifiers (public, protected, private, static, abstract and final) are consistently ordered. The modifier ordering that is enforced is consistent with PSR-2.

Test Plan: Added unit tests.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7417

Differential Revision: https://secure.phabricator.com/D12421

Details