Polished source readability, expanded documentation, and added 'SECURITY.md'. - #130
Conversation
…e body, and added 'SECURITY.md'.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 20 minutes Limit details: You’ve used all 2 included reviews currently available under your plan. You completed 88 included PR reviews in the past 7 days; at that activity level, included reviews refill at 2 reviews per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
Comment |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
==========================================
- Coverage 88.52% 88.05% -0.47%
==========================================
Files 3 3
Lines 453 452 -1
==========================================
- Hits 401 398 -3
- Misses 52 54 +2 ☔ View full report in Codecov by Harness. |
Summary
This is a documentation and readability polish pass with no behavioural change: all 144 PHPUnit tests, all 14 Behat scenarios (153 steps), PHPCS, PHPStan level 9, Rector and gherkinlint pass unchanged. Nested conditionals in
PhpServerContextandApiServerContextwere flattened into guard clauses, a couple of redundant variables were removed, and comments were either deleted for restating the code they sat above or rewritten from imperative to declarative phrasing. The README gained previously undocumented constructor options and steps, a context options table, a full HTTP endpoint reference table, and a note that response bodies must be base64-encoded on a direct API call.SECURITY.mdwas added, and the README'sMaintenancesection was replaced with a pointer toCONTRIBUTING.md, which gained the template-update note in its place.Changes
Source readability
PhpServerContext::start()- moved a comment that sat betweensprintf(and its first argument above the statement, and turned the assign-or-throw block into a guard clause so the success path is no longer nested.PhpServerContext::getPidNetstat()- replaced five levels of nesting with threecontinueguards.ApiServerContext::apiWillRespondWithFile()- dropped$file_found(redundant with the$absolute_pathcheck) and$error_paths(an exact copy of$this->fixturesPathson the throw path).returnstatements andifblocks at 15 spots for consistent vertical rhythm.Documentation
connection_timeoutandretry_delayconstructor options, thethe API has no responsesandI debug API requestssteps, and the alternative step phrasings, in a new context options table and a full HTTP endpoint table.bodymust be base64-encoded on a directPUT /admin/responsescall, sinceResponse::fromArray()base64-decodes it; the previous JSON example implied a plain string.alt="Yourproject logo"template leftover, an emptyhref=""link, and a duplicated "API server server" phrase.Maintenancesection, since its lint and test content already lives inCONTRIBUTING.md, and left aContributingpointer in its place. Added a template-update pointer toCONTRIBUTING.md.SECURITY.md, which the repository lacked.Before / After