-
Notifications
You must be signed in to change notification settings - Fork 4
#6 - update ecs config #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the ECS (Easy Coding Standard) configuration for PHP linting rules. It modifies the PropertySpacingSniff rule to require blank lines before properties regardless of whether they have comments, and adds several skip rules to exclude specific directories and files from certain code quality checks.
Key changes:
- Modified PropertySpacingSniff to enforce consistent blank line spacing before properties
- Added skip configurations for multiple sniffs targeting specific Laravel application directories
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ]) | ||
| ->withSkip([ | ||
| PhpCsFixer\Fixer\AttributeNotation\OrderedAttributesFixer::class => [ | ||
| getcwd() . '/app/Data', |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using getcwd() for path construction is fragile and assumes the command is always run from a specific directory. Consider using __DIR__ or a more reliable base path resolution mechanism to ensure paths work correctly regardless of where the command is executed from.
| SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff::class => [ | ||
| getcwd() . '/app/Models', | ||
| getcwd() . '/app/Policies', | ||
| getcwd() . '/app/Repositories/QuerySorts', | ||
| getcwd() . '/app/Scopes', | ||
| getcwd() . '/app/Traits', | ||
| getcwd() . '/app/Data/Casts', |
Copilot
AI
Nov 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Skipping UnusedParameterSniff for so many directories (7 different paths) may hide genuine code quality issues. Consider addressing unused parameters in these locations or documenting why these specific directories require this exception.
| SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff::class => [ | |
| getcwd() . '/app/Models', | |
| getcwd() . '/app/Policies', | |
| getcwd() . '/app/Repositories/QuerySorts', | |
| getcwd() . '/app/Scopes', | |
| getcwd() . '/app/Traits', | |
| getcwd() . '/app/Data/Casts', | |
| SlevomatCodingStandard\Sniffs\Functions\UnusedParameterSniff::class => [ | |
| // Models: Often must implement framework interfaces with unused parameters. | |
| getcwd() . '/app/Models', | |
| // Policies: Method signatures required by Laravel, may have unused parameters. | |
| getcwd() . '/app/Policies', | |
| // QuerySorts: Custom sorting interfaces may require unused parameters. | |
| getcwd() . '/app/Repositories/QuerySorts', | |
| // Scopes: Laravel scopes require specific method signatures. | |
| getcwd() . '/app/Scopes', | |
| // Traits: Traits must match interface signatures, may have unused parameters. | |
| getcwd() . '/app/Traits', | |
| // Data Casts: Custom cast classes may require unused parameters for interface compliance. | |
| getcwd() . '/app/Data/Casts', | |
| // Providers: Service providers may have unused parameters for compatibility. |
closes #6