Skip to content

Rector fix - Force strict equals for same type#2598

Merged
Crabcyborg merged 1 commit into
masterfrom
rector_force_strict_equals_for_same_type
Nov 25, 2025
Merged

Rector fix - Force strict equals for same type#2598
Crabcyborg merged 1 commit into
masterfrom
rector_force_strict_equals_for_same_type

Conversation

@Crabcyborg
Copy link
Copy Markdown
Contributor

No description provided.

@Crabcyborg Crabcyborg added this to the 6.26 milestone Nov 25, 2025
@Crabcyborg Crabcyborg changed the title Rector fix - force strict equals for same type Rector fix - Force strict equals for same type Nov 25, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 25, 2025

Walkthrough

This PR systematically replaces loose equality operators (== and !=) with strict equality operators (=== and !==) across multiple controller, helper, and model files, while removing the corresponding Rector rule that previously enforced this pattern conversion.

Changes

Cohort / File(s) Summary
Loose-to-strict equality operator refactoring
classes/controllers/FrmEntriesController.php, classes/helpers/FrmAppHelper.php, classes/helpers/FrmEntriesHelper.php, classes/helpers/FrmFieldsHelper.php, classes/helpers/FrmFormsListHelper.php, classes/helpers/FrmListHelper.php, classes/helpers/FrmXMLHelper.php, classes/models/FrmCreateFile.php, classes/models/FrmDb.php, classes/models/FrmEntryMeta.php, classes/models/FrmField.php
Replaced loose equality checks (== and !=) with strict equality checks (=== and !==) in conditional expressions throughout the codebase to enforce type-safe comparisons without altering control flow or logic.
Rector configuration
rector.php
Removed the UseIdenticalOverEqualWithSameTypeRector rule from the import list and withSkip() configuration, eliminating this rule from being applied during code analysis.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Areas that may require attention:

  • Verify that each replaced comparison is contextually appropriate for strict equality (no cases where loose equality was intentionally used for type coercion)
  • Confirm the removal of the Rector rule aligns with the manual completion of this refactoring pattern across the codebase
  • Check for any edge cases where type coercion was relied upon (unlikely given the pattern, but worth scanning)

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided by the author; the pull request lacks any explanation of the changes or rationale. Add a description explaining why strict equality checks are being enforced and how this improves code quality and type safety.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The title accurately reflects the main change: systematic replacement of loose equality operators (== and !=) with strict equality operators (=== and !==) across multiple files, aligning with the Rector rule for enforcing strict type comparison.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rector_force_strict_equals_for_same_type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crabcyborg Crabcyborg merged commit 68e5510 into master Nov 25, 2025
34 of 36 checks passed
@Crabcyborg Crabcyborg deleted the rector_force_strict_equals_for_same_type branch November 25, 2025 21:12
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…or_same_type

Rector fix - Force strict equals for same type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant