- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
PhpdocOrderByValueFixer - Add additional annotations to sort #5391
PhpdocOrderByValueFixer - Add additional annotations to sort #5391
Conversation
a8241a4
to
b9df4f2
Compare
6ad2139
to
42d55a8
Compare
Thanks for the PR! Starting with the added [
'<?php
/**
* @method int foo(Z $b)
* @method int fooA( $b)
*/
class Foo {}
',
'<?php
/**
* @method int fooA( $b)
* @method int foo(Z $b)
*/
class Foo {}
',
], If there is no return type, for example [
'<?php
/**
* @method int a($b)
* @method z($b)
*/
class Foo {}
',
'<?php
/**
* @method z($b)
* @method int a($b)
*/
class Foo {}
',
], The properties fixing have a similar issue. For example [
'<?php
/**
* @property-read $a
* @property-read int $z
*/
class Foo {}
',
'<?php
/**
* @property-read int $z
* @property-read $a
*/
class Foo {}
',
] Of course this is me expecting the sorting is on the names of the method/properties and being agnostic to the return type, however to might not what others expect. |
Thank you for taking the time to review and experiment! Will look into it! |
How about now? |
looking great, thanks! |
b3be523
to
604a112
Compare
…rite annotations by value Enhancement: Allow sorting of method annotations by value
604a112
to
f98de85
Compare
Thank you @localheinz. |
Thank you, @drupol and @SpacePossum! |
This PR
phpdoc_order_by_value
fixer to allow sorting of additional annotations by value@method
@property
@property-read
@property-write