We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Before running PHP CS Fixer:
class Foo { public function setTitle($title) { ... } public function getTitle() { ... } public function hasTitle(): bool { ... } }
After running PHP CS Fixer:
class Foo { public function getTitle() { ... } public function setTitle($title) { ... } public function hasTitle(): bool { ... } }
Suggested rule names: ordered_mutator_accessor, ordered_get_set_has, or ordered_class_methods. Configuration: ['get', 'set', 'has']
ordered_mutator_accessor
ordered_get_set_has
ordered_class_methods
['get', 'set', 'has']
Where property is NN, the ordering should be: NN, getNN, setNN, hasNN, haveNN, xxNN
NN
NN, getNN, setNN, hasNN, haveNN, xxNN
The text was updated successfully, but these errors were encountered:
I would also suggest 'is' for the following case:
'is'
interface Foo { public function setValid($valid); public function getValid(); public function isValid(); }
Sorry, something went wrong.
closing as duplicate of #2746, please follow that thread instead.
No branches or pull requests
Before running PHP CS Fixer:
After running PHP CS Fixer:
Suggested rule names:
ordered_mutator_accessor
,ordered_get_set_has
, orordered_class_methods
.Configuration:
['get', 'set', 'has']
Other notes
Where property is
NN
, the ordering should be:NN, getNN, setNN, hasNN, haveNN, xxNN
The text was updated successfully, but these errors were encountered: