-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Enhancement: Implement Methods\FinalInAbstractClassRule #123
Enhancement: Implement Methods\FinalInAbstractClassRule #123
Conversation
Codecov Report
@@ Coverage Diff @@
## master #123 +/- ##
============================================
- Coverage 84.28% 83.88% -0.41%
- Complexity 118 125 +7
============================================
Files 20 21 +1
Lines 401 422 +21
============================================
+ Hits 338 354 +16
- Misses 63 68 +5
Continue to review full report at Codecov.
|
|
||
abstract class AbstractClassWithPublicMethod | ||
{ | ||
protected function method(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @OskarStark!
README.md
Outdated
|
||
```neon | ||
parameters: | ||
allowAbstractClasses: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the name correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking a look, but yes, it's correct - it's the same parameter that is currently used by Localheinz\PHPStan\Rules\Classes\FinalRule
, see rules.neon
.
On the other hand, perhaps the parameter is not even needed.
d7177d3
to
7ed2763
Compare
c8d37a4
to
4b1ed80
Compare
This PR
Methods\FinalInAbstractClassRule
, which reports an error when a concretepublic
orprotected
method in anabstract
class is notfinal
abstract
class asfinal
Fixes #88.