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] apply SetList::DEAD_CODE, better type checking (see description for breakdown) #7011

Merged
merged 22 commits into from
Aug 9, 2024

Conversation

DAcodedBEAT
Copy link
Contributor

This commit includes a variety of changes that improve the codebase's quality and consistency. The following changes were made:

  • Replaced == with === for strict comparisons.
  • Removed redundant break statements after return in switch-case structures.
  • Fixed variable naming consistency and unnecessary variable assignments.
  • Simplified conditional statements and removed unused code.
  • Corrected minor typos and formatted code for better readability.
  • Enhanced type safety by casting variables explicitly and adding type hints.
  • Improved function and variable documentation with consistent comments.
  • Refactored repeated logic to improve maintainability.
  • Removed redundant checks for null values and unnecessary extractions.

@DAcodedBEAT DAcodedBEAT added Code Smell php Pull requests that update Php code labels May 8, 2024
@DAcodedBEAT DAcodedBEAT requested a review from a team as a code owner May 8, 2024 04:51
@DAcodedBEAT DAcodedBEAT requested review from respencer, DawoudIO, grayeul and MrClever and removed request for a team May 8, 2024 04:51
@DAcodedBEAT DAcodedBEAT added this to the vNext (5.9.0) milestone May 8, 2024
@DAcodedBEAT DAcodedBEAT marked this pull request as draft May 8, 2024 06:20
@DAcodedBEAT
Copy link
Contributor Author

@respencer if you have any free time, feel free to pull this down and see if anything is any more broken than how things are currently

@respencer
Copy link
Contributor

@respencer if you have any free time, feel free to pull this down and see if anything is any more broken than how things are currently

I'm constantly finding things that are broken. We shouldn't continue to add to this PR though.

What's an acceptable middle ground for you?

@DAcodedBEAT
Copy link
Contributor Author

@respencer if you have any free time, feel free to pull this down and see if anything is any more broken than how things are currently

I'm constantly finding things that are broken. We shouldn't continue to add to this PR though.

What's an acceptable middle ground for you?

@respencer I'm thinking we can merge this after the current release finally gets cut.

@respencer
Copy link
Contributor

I still have a few things to add, but there's some wonky changes I want to track down the cause of before continuing.

@DAcodedBEAT DAcodedBEAT force-pushed the rector-cleanup branch 2 times, most recently from 23e29dd to f9d0e23 Compare May 28, 2024 04:02
@DAcodedBEAT DAcodedBEAT marked this pull request as ready for review June 13, 2024 04:45
@DAcodedBEAT
Copy link
Contributor Author

Holding this until rectorphp/rector-src#5964 gets released and then I'll rerun

@DawoudIO DawoudIO modified the milestones: 5.9.0, vNext (5.10.0) Jun 15, 2024
@DAcodedBEAT DAcodedBEAT marked this pull request as ready for review August 9, 2024 03:18
DAcodedBEAT and others added 22 commits August 8, 2024 23:18
This commit includes a variety of changes that improve the codebase's quality and consistency. The following changes were made:

- Replaced `==` with `===` for strict comparisons.
- Removed redundant `break` statements after `return` in switch-case structures.
- Fixed variable naming consistency and unnecessary variable assignments.
- Simplified conditional statements and removed unused code.
- Corrected minor typos and formatted code for better readability.
- Enhanced type safety by casting variables explicitly and adding type hints.
- Improved function and variable documentation with consistent comments.
- Refactored repeated logic to improve maintainability.
- Removed redundant checks for null values and unnecessary extractions.

functions
Also deleted unused monthCounter variable.
This commit includes a variety of changes that improve the codebase's quality and consistency. The following changes were made:

- Replaced `==` with `===` for strict comparisons.
- Removed redundant `break` statements after `return` in switch-case structures.
- Fixed variable naming consistency and unnecessary variable assignments.
- Simplified conditional statements and removed unused code.
- Corrected minor typos and formatted code for better readability.
- Enhanced type safety by casting variables explicitly and adding type hints.
- Improved function and variable documentation with consistent comments.
- Refactored repeated logic to improve maintainability.
- Removed redundant checks for null values and unnecessary extractions.
@DAcodedBEAT
Copy link
Contributor Author

@respencer / @DawoudIO this has been rebased and is ready to go

@DAcodedBEAT DAcodedBEAT modified the milestones: vNext (5.11.0), 5.10.0 Aug 9, 2024
@DAcodedBEAT DAcodedBEAT merged commit 630f148 into master Aug 9, 2024
6 checks passed
@DAcodedBEAT DAcodedBEAT deleted the rector-cleanup branch August 9, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Smell php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants