We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How do I correctly suppress this? CakePHP requires traits to have the suffix 'Trait' so I want to ignore this.
<?php declare(strict_types=1); namespace App\Model\Table; /** * This trait naming pattern follows CakePHP conventions, so ignore PHPCS warning * * @phpcsSuppress SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix */ trait VariablesTableTrait { }
$ vendor/squizlabs/php_codesniffer/bin/phpcs -s src/Model/Table/VariablesTableTrait.php FILE: /app/src/Model/Table/VariablesTableTrait.php -------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------- 11 | ERROR | Superfluous suffix "Trait". (SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix) --------------------------------------------------------------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
It seems the syntax has changed. This worked:
<?php declare(strict_types=1); namespace App\Model\Table; /** * This trait naming pattern follows CakePHP conventions, so ignore PHPCS warning * * phpcs:disable SlevomatCodingStandard.Classes.SuperfluousTraitNaming.SuperfluousSuffix */ trait VariablesTableTrait { }
Please update the README and other examples that still use @phpcsSuppress as this no longer seems to be the correct syntax. https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file
Sorry, something went wrong.
No branches or pull requests
How do I correctly suppress this? CakePHP requires traits to have the suffix 'Trait' so I want to ignore this.
The text was updated successfully, but these errors were encountered: