Skip to content
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

✨ New Universal.Constants.ModifierKeywordOrder sniff #143

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 30, 2022

Sniff to standardize the modifier keyword order for OO constant declarations.

The sniff contains a public $order property which allows for configuring the preferred order.
Allowed values:

  • 'final visibility' (= default)
  • 'visibility final'

Includes fixer.
Includes unit tests.
Includes documentation.
Includes metrics.

Refs:

Sniff to standardize the modifier keyword order for OO constant declarations.

The sniff contains a `public` `$order` property which allows for configuring the preferred order.
Allowed values:
* `'final visibility'` (= default)
* `'visibility final'`

Includes fixer.
Includes unit tests.
Includes documentation.
Includes metrics.

Refs:
* PHP 8.1: https://wiki.php.net/rfc/final_class_const
* PHP 7.1: https://wiki.php.net/rfc/class_const_visibility
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Oct 30, 2022
@jrfnl jrfnl merged commit 4894d9f into develop Oct 30, 2022
@jrfnl jrfnl deleted the universal/new-oo-constant-modifier-keyword-order-sniff branch October 30, 2022 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant