CRM icon indicating copy to clipboard operation
CRM copied to clipboard

[rector] apply SetList::DEAD_CODE, better type checking (see description for breakdown)

Open DAcodedBEAT opened this issue 9 months ago • 6 comments

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 avatar May 08 '24 04:05 DAcodedBEAT

@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

DAcodedBEAT avatar May 17 '24 13:05 DAcodedBEAT

@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 avatar May 17 '24 14:05 respencer

@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.

DAcodedBEAT avatar May 17 '24 19:05 DAcodedBEAT

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

respencer avatar May 21 '24 10:05 respencer

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

DAcodedBEAT avatar Jun 13 '24 19:06 DAcodedBEAT

@DawoudIO please leave this PR. I'm working with upstream to fix rector to account for some of the strange code we have here

DAcodedBEAT avatar Jun 15 '24 22:06 DAcodedBEAT

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Aug 09 '24 02:08 github-actions[bot]

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

DAcodedBEAT avatar Aug 09 '24 03:08 DAcodedBEAT