phpcs-check-fix

Installation
SKILL.md

PHPCS Check and Fix

This project uses PHP CodeSniffer (PHPCS) with the FigLab Coding Standard (which extends the IxDF Coding Standard, built on PSR + Slevomat rules). The config lives in phpcs.xml at the project root.

Commands

  • Auto-fix: composer cs:fix — runs PHPCBF to automatically fix what it can
  • Check: composer cs:check — runs PHPCS to report remaining violations

Workflow

Follow this exact sequence:

  1. Run composer cs:fix to auto-fix as many issues as possible. This handles spacing, bracket placement, import ordering, and other mechanical fixes.

  2. Run composer cs:check to see what remains. Parse the output carefully — it shows the file path, line number, error type, and the sniff name (e.g., SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh).

  3. Fix remaining issues manually, one by one. The approach depends on the violation type — see the section below.

Installs
9
GitHub Stars
5
First Seen
Mar 10, 2026
phpcs-check-fix — figlabhq/agent-skills