Skip to content

Apply conservative Rector cleanup#55

Merged
dereuromark merged 7 commits into
masterfrom
rector-cleanup-20260524
May 25, 2026
Merged

Apply conservative Rector cleanup#55
dereuromark merged 7 commits into
masterfrom
rector-cleanup-20260524

Conversation

@dereuromark
Copy link
Copy Markdown
Owner

Cleanup-only Rector follow-up PR. No Rector dependency or config is added here; this keeps the branch focused on conservative code cleanup only.

Copilot AI review requested due to automatic review settings May 25, 2026 12:29
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Conservative Rector/PHPCS cleanup pass across the plugin, modernizing some PHP syntax and doing small refactors while aiming to preserve behavior.

Changes:

  • Modernized PHP syntax (e.g., str_starts_with(), match, catch without variable, ternaries) and simplified return paths.
  • Minor refactors in captcha validation helpers/behaviors and math rendering.
  • Small static-analysis/docblock adjustments in controller code.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/schema.php Uses catch without an unused exception variable during fixture schema reflection.
tests/bootstrap.php Simplifies Windows detection using str_starts_with().
src/View/Helper/CaptchaHelper.php Simplifies render return concatenation for passive honeypot field output.
src/Model/Behavior/PassiveCaptchaBehavior.php Adjusts logging string concatenation in honeypot validation rule.
src/Model/Behavior/CaptchaBehavior.php Simplifies min/max time comparisons and minor UUID empty check refactor.
src/Engine/MathEngine.php Refactors image output selection to match within output buffering.
src/Engine/Math/SimpleMath.php Collapses arithmetic branch to a ternary expression.
src/Controller/CaptchaController.php Adds inline docblock type annotation for $captcha.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Model/Behavior/PassiveCaptchaBehavior.php
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.92%. Comparing base (dc0db99) to head (2bb20a6).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/Engine/MathEngine.php 80.00% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #55      +/-   ##
============================================
- Coverage     86.94%   86.92%   -0.03%     
+ Complexity      232      231       -1     
============================================
  Files            18       18              
  Lines           789      780       -9     
============================================
- Hits            686      678       -8     
+ Misses          103      102       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dereuromark dereuromark merged commit d0e60f4 into master May 25, 2026
16 checks passed
@dereuromark dereuromark deleted the rector-cleanup-20260524 branch May 25, 2026 13:13
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.

3 participants