-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Summary
Copilot review of PR #420 identified several pre-existing code style inconsistencies throughout the codebase that should be addressed in a separate cleanup pass.
Items to Address
1. Space before comma in ::class references
Files: src/Model/OptionItem.php, src/Page/ProductPage.php, tests/OptionItemTest.php, tests/ProductPageTest.php
Currently uses ClassName::class , with a space before the comma. Standard PHP convention is ClassName::class, without the space. This pattern exists in 10+ locations across src/ and 20+ locations in tests.
2. Type cast spacing
File: src/Model/OptionItem.php:365
Missing space after type cast: (string)$variable should be (string) $variable.
3. Trailing whitespace
File: src/Model/OptionItem.php:367
Trailing whitespace at end of line.
4. Semicolon/brace formatting
File: src/Page/ProductPage.php:237
Semicolon on separate line after closing brace.
5. Parameter indentation
File: src/Model/OptionItem.php:369-370
Function call parameters not aligned with opening parenthesis.
Recommended Approach
Run PHPCBF with PSR-12 rules to auto-fix most of these in a single pass:
vendor/bin/phpcbf --standard=PSR12 src/ tests/Refs: PR #420 Copilot review (Review 3)