Skip to content

fix(style): Add phpdoc_param_order rule and update namespace references in rector.php.#118

Merged
terabytesoftw merged 2 commits intomainfrom
fix_mini_12
Jan 24, 2026
Merged

fix(style): Add phpdoc_param_order rule and update namespace references in rector.php.#118
terabytesoftw merged 2 commits intomainfrom
fix_mini_12

Conversation

@terabytesoftw
Copy link
Contributor

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Added an extra PHPDoc validation rule to strengthen code quality checks.
    • Updated tooling configuration to improve reliability across environments.
  • Refactor

    • Modernized several internal code constructs (fully-qualified references and more concise closure/arrow syntax) to reduce namespace issues and improve readability.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Adds a StyleCI PHPDoc rule, fully qualifies Rector class references by adding leading backslashes, and updates three internal PHP closures to use short arrow functions or more concise callbacks; no public API changes.

Changes

Cohort / File(s) Summary
StyleCI Configuration
.styleci.yml
Enables phpdoc_param_order within the enabled StyleCI rules.
Rector configuration
rector.php
Adds leading backslashes to fully-qualify Rector class references in the returned closure (parameter type, sets, skip, and rules entries).
Fallback logic
src/Fallback/ComposerFallback.php
Replaced a static anonymous function with a static short arrow function for option boolean checking (syntactic change only).
JSON formatting
src/Json/JsonFormatter.php
Rewrote internal callbacks to use array_walk_recursive with static closures and short arrow functions; retained behavior for unescaping Unicode sequences.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

Estado: error

Poem

🐰 I hopped through configs, neat and spry,
Adding slashes, trimming lines on high,
PHPDocs ordered, callbacks made small,
A tidy patch—I bounce and call! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: adding phpdoc_param_order rule and updating rector.php namespace references, which aligns with the changeset.
Description check ✅ Passed The description is related to the changeset, confirming this is a bugfix with no breaking changes, matching the nature of the style/configuration updates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7d063b and ce7d538.

📒 Files selected for processing (2)
  • src/Fallback/ComposerFallback.php
  • src/Json/JsonFormatter.php
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: tests/Fallback/AssetFallbackTest.php:158-189
Timestamp: 2026-01-23T11:22:00.118Z
Learning: User terabytesoftw prefers not to use aliases when importing classes in PHP. They are comfortable with either fully-qualified class names or direct imports without aliases.
Learnt from: terabytesoftw
Repo: php-forge/support PR: 12
File: src/TestSupport.php:0-0
Timestamp: 2025-08-18T20:13:33.518Z
Learning: User terabytesoftw prefers clean trait-based designs over maintaining backward compatibility wrappers when refactoring utility classes in the php-forge/support project.
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 65
File: .github/workflows/composer-require-checker.yml:80-83
Timestamp: 2025-09-28T15:12:48.345Z
Learning: The user terabytesoftw prefers using floating tags like v1 for third-party actions in GitHub workflows instead of pinning to specific commit SHAs, even when it's a security best practice to pin to immutable commits.
🧬 Code graph analysis (1)
src/Fallback/ComposerFallback.php (1)
tests/Fallback/ComposerFallbackTest.php (5)
  • testRestoreWithDisableOption (142-150)
  • option (187-191)
  • option (163-168)
  • option (97-97)
  • testRestore (73-137)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: composer-require-checker / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: linter / Super Linter
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
🔇 Additional comments (2)
src/Fallback/ComposerFallback.php (1)

145-145: Arrow-function refactor is safe.

This is a pure syntax change and preserves the same truthy checks.

src/Json/JsonFormatter.php (1)

108-123: Unicode unescape refactor looks correct.

The callback rewrite keeps the same transformation and keeps the recursion intact.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@codecov
Copy link

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9151b2c) to head (ce7d538).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #118   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       359       359           
===========================================
  Files             26        26           
  Lines            821       823    +2     
===========================================
+ Hits             821       823    +2     

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

@coderabbitai coderabbitai bot added the bug Something isn't working label Jan 24, 2026
@terabytesoftw terabytesoftw merged commit 34fbd45 into main Jan 24, 2026
48 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_12 branch January 24, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant