Skip to content

Chore: Switch Pint preset from psr12 to per#244

Merged
loks0n merged 1 commit intomainfrom
chore/pint-per-preset
Apr 24, 2026
Merged

Chore: Switch Pint preset from psr12 to per#244
loks0n merged 1 commit intomainfrom
chore/pint-per-preset

Conversation

@loks0n
Copy link
Copy Markdown
Contributor

@loks0n loks0n commented Apr 24, 2026

Summary

  • Switch pint.json preset from psr12 to per (PER-CS 2.0, superset of PSR-12).
  • Reformat 21 files with the preset's fixers: concat_space, trailing_comma_in_multiline, single_line_empty_body, function_declaration, operator_linebreak, nullable_type_declaration, types_spaces, cast_spaces.
  • Pint version is already latest (1.29.1), no bump needed.

Test plan

  • composer format:check passes
  • composer test passes
  • composer analyze passes

🤖 Generated with Claude Code

Adopts the PER-CS 2.0 coding standard (superset of PSR-12). Reformats
affected files with the preset's fixers: concat_space, trailing_comma_in_multiline,
single_line_empty_body, function_declaration, operator_linebreak,
nullable_type_declaration, types_spaces, cast_spaces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 24, 2026

Greptile Summary

This PR switches the Laravel Pint code style preset from psr12 to per (PER-CS 2.0, a superset of PSR-12) and applies the resulting reformatting across all 22 affected files. All changes are purely cosmetic — no logic, behavior, or interfaces are altered.

Confidence Score: 5/5

Safe to merge — purely a formatting change with no functional impact.

All 22 files contain only mechanical style reformatting driven by the PER-CS 2.0 preset (concat spacing, trailing commas, empty-body collapsing, fn() style, operator linebreak, nullable shorthand). No logic, APIs, or data flows are changed.

No files require special attention.

Important Files Changed

Filename Overview
pint.json Switches Pint preset from psr12 to per (PER-CS 2.0) and adds a trailing newline.
src/Http/Http.php Pure formatting: trailing commas in multiline calls, fn () =>fn() =>, and union-type spacing (`ContainerExceptionInterface
src/Http/Response.php Pure formatting: concat spacing, and boolean operator moved to start-of-line (PER-CS operator_linebreak rule).
src/Http/Router.php Nullable return type `Route
src/Http/Adapter/SwooleCoroutine/Request.php Empty class body collapsed to single-line form per single_line_empty_body rule; no functional change.
src/Http/Adapter/SwooleCoroutine/Response.php Empty class body collapsed to single-line form; no functional change.
src/Http/Exception.php Empty class body collapsed to single-line form; no functional change.
src/Http/Adapter/FPM/Server.php Constructor empty body collapsed; fn () =>fn() =>; no functional change.
tests/HttpTest.php Trailing commas in array literals and fn () =>fn() =>; no logic changes.
tests/RouteTest.php Empty closure bodies collapsed to single-line; fn () =>fn() =>; no logic changes.

Reviews (1): Last reviewed commit: "Chore: Switch Pint preset from psr12 to ..." | Re-trigger Greptile

@github-actions
Copy link
Copy Markdown

k6 benchmark

Throughput Requests Fail rate p50 p95
11581 req/s 810835 0% 3.22 ms 8.58 ms

@loks0n loks0n merged commit e282738 into main Apr 24, 2026
7 checks passed
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.

1 participant