Skip to content

Conversation

@mikemeijer
Copy link
Contributor

closes #6

Copilot AI review requested due to automatic review settings November 20, 2025 14:46
Copy link
Contributor

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

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',
Copy link

Copilot AI Nov 20, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +335 to +341
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',
Copy link

Copilot AI Nov 20, 2025

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@mikemeijer mikemeijer closed this Nov 20, 2025
@mikemeijer mikemeijer deleted the bugfix-6 branch November 20, 2025 14:48
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.

Some improvements after implementing in IVIO

2 participants