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

ForbiddenNames: allow for the final keyword in trait use statements #402

Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 12, 2017

According to the RFC which introduced traits, the final modifier is supported as well. The sniff did so far not account for this and would throw a false positive for use of the reserved keyword final in that case.

Example code:

use sayHello as final;
use sayHello as final myFinalHello;

Ref: https://wiki.php.net/rfc/horizontalreuse#visibility

Includes a new usecase test file.

According to the RFC which introduced traits, the `final` modifier is supported as well. The sniff did so far not account for this and would throw a false positive for use of the reserved keyword `final` in that case.

Example code:
```php
use sayHello as final;
use sayHello as final myFinalHello;
```

Ref: https://wiki.php.net/rfc/horizontalreuse#visibility

Includes a new usecase test file.
@coveralls
Copy link

coveralls commented Apr 12, 2017

Coverage Status

Coverage increased (+0.008%) to 95.905% when pulling 9229d3b on jrfnl:feature/forbidden-names-use-as-final into aabac47 on wimg:master.

@wimg wimg merged commit 4d1cdb6 into PHPCompatibility:master Apr 26, 2017
@jrfnl jrfnl deleted the feature/forbidden-names-use-as-final branch April 26, 2017 15:19
@jrfnl jrfnl added this to the 7.1.4 milestone May 3, 2017
@jrfnl jrfnl added the bug label Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants