awyiss / phpcs-sniffs
Custom PHP_CodeSniffer standard and sniffs for Awyiss projects
Package info
github.com/fabian-mcfly/awyiss-phpcs-sniffs
Type:phpcodesniffer-standard
pkg:composer/awyiss/phpcs-sniffs
v0.3
2026-08-16 22:26 UTC
Requires
- php: >=8.4
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- squizlabs/php_codesniffer: ^4.0.4
Requires (Dev)
- phpunit/phpunit: ^13.0
This package is auto-updated.
Last update: 2026-08-16 22:27:42 UTC
README
PHPCS standard with custom rules for Awyiss projects.
Installation
composer require awyiss/phpcs-sniffs
Usage
vendor/bin/phpcs --standard=Awyiss src
What the sniffs do
Arrays
NoInlineCommentedArrayItemSniff: Comments cannot be on the same line as an array item. The comment must be on its own line.
Classes
ClassMemberSpacingSniff: Enforces blank lines between class members. Same groups have no blank line, different groups have two blank lines, methods have one or two blank lines.
Commenting
SeeUsesTagSpacingSniff: Requires exactly one space after@seeand@uses.VariableCommentSniff: Validates property docblocks. Special case: missing@varis allowed when@inheritdocis present.
Functions
ArrowFunctionDeclarationSniff: Validates arrow function (fn) formatting. No space before(, exactly one space around=>, and clean indentation for wrapped lines.
Operators
MethodChainingSniff: Validates method chains. Long or multiline chains must be wrapped and indented consistently, including semicolon placement.
WhiteSpace
ArrayUnionIndentationSniff: Aligns the closing]correctly in specific multiline array union cases.ConstantDeclarationSpacingSniff: In typedconstdeclarations, requires exactly one space between the type and constant name.SemicolonSpacingSniff: Disallows whitespace before;. Also applies rules for method chains and multiline string concatenation.SingleArgumentNotMultilineSniff: Prevents simple single argument calls from being split across multiple lines without need.