awyiss/phpcs-sniffs

Custom PHP_CodeSniffer standard and sniffs for Awyiss projects

Maintainers

Package info

github.com/fabian-mcfly/awyiss-phpcs-sniffs

Type:phpcodesniffer-standard

pkg:composer/awyiss/phpcs-sniffs

Transparency log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.3 2026-08-16 22:26 UTC

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 @see and @uses.
  • VariableCommentSniff: Validates property docblocks. Special case: missing @var is allowed when @inheritdoc is 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 typed const declarations, 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.