-
Notifications
You must be signed in to change notification settings - Fork 582
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
[3.x] Fix return type #2140
[3.x] Fix return type #2140
Conversation
|
Codecov ReportBase: 59.92% // Head: 59.92% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## 3.x #2140 +/- ##
=========================================
Coverage 59.92% 59.92%
Complexity 3898 3898
=========================================
Files 303 303
Lines 15014 15014
=========================================
Hits 8997 8997
Misses 6017 6017
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Awesome @aksiome, we were actually discussing addressing this with @haringsrob a couple days ago. And @joyceverheije was looking into it to to fix PHPstan issues. Thank you for working on this! |
Hey @aksiome this was indeed on my list too long! Thanks for fixing, the capsule phpcs issue is fixed in another pr so this is good to go! |
A quick fix to silence IDE errors
I've noticed that setter methods used the self return type when returning $this. I believe it's best to return static now. This way users can extend classes without getting errors when chaining method calls.
I also removed the slugs mixin from the model interface since it is supposed to be an optional trait. Noticed it was added with the caching route fix but I'm not entirely sure why.