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

Rector updates #1989

Merged
merged 10 commits into from
Dec 25, 2024
Merged

Rector updates #1989

merged 10 commits into from
Dec 25, 2024

Conversation

hemberger
Copy link
Member

Add more rector rules and include it in standard testing (local and GHA).

This is done for both local testing and GitHub Actions.

Use `--dry-run` so that no changes are made during testing.
Use the new fluent interface for setting up the rector configuration.

No functionality changes.
This is a regression from a previously added rule. See 78baae6.
This rule makes expressions like this safer because we only write out
the variable name once.
This rule simplifies the class interface by combining the ctor argument
with the property declaration.
If class properties are never set outside the ctor, they can be marked
as readonly.
No changes, but is something we want to make sure is done in the future.

Related to smrealms#1775.
Explicitly declare types for all class constants.

Related to smrealms#1775.
Static methods do not need to be called on a class instance, and so they
should use the static context, even if a class instance is present.
This makes the expression safer since we only write out the variable
name once.
Copy link

codecov bot commented Dec 25, 2024

Codecov Report

Attention: Patch coverage is 46.15385% with 7 lines in your changes missing coverage. Please review.

Project coverage is 31.45%. Comparing base (4f2dcf6) to head (223fd35).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/lib/Default/smr.inc.php 0.00% 3 Missing ⚠️
src/lib/Smr/SocialLogin/Facebook.php 0.00% 1 Missing ⚠️
src/lib/Smr/SocialLogin/Google.php 0.00% 1 Missing ⚠️
src/lib/Smr/SocialLogin/SocialLogin.php 0.00% 1 Missing ⚠️
src/lib/Smr/SocialLogin/Twitter.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1989      +/-   ##
============================================
- Coverage     31.48%   31.45%   -0.03%     
+ Complexity     4207     4205       -2     
============================================
  Files           125      125              
  Lines         12820    12815       -5     
============================================
- Hits           4036     4031       -5     
  Misses         8784     8784              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hemberger hemberger merged commit d254e9d into smrealms:main Dec 25, 2024
9 checks passed
@hemberger hemberger deleted the rector-updates branch December 25, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant