flyeralarm/php-code-validator
FLYERALARM PHP coding guideline validator: a PSR-12 based PHP_CodeSniffer ruleset with extra standards like lowerCamelCase variables, no Yoda conditions, bans on eval/goto, namespace underscores, and certain class suffixes. Easy Composer embed via ruleset.xml.
lowerCamelCase, Yoda conditions) to reduce cognitive load during code reviews and PRs.sniff-fix.Adopt if:
Look Elsewhere if:
For Executives: "This package lets us automate and enforce PHP coding standards across our Laravel projects, reducing bugs, onboarding time, and manual review effort. By integrating it into our CI pipeline, we’ll catch style violations early—saving engineering time and improving code quality. It’s a low-maintenance, high-impact solution that aligns with industry best practices (PSR-12) while adding our custom rules. Think of it as Prettier for PHP: no more debates over formatting, just consistent, high-quality code."
For Engineering Leaders:
*"We’re adopting a pre-configured PHP_CodeSniffer ruleset that enforces PSR-12 plus FLYERALARM-specific conventions (e.g., lowerCamelCase variables, no Yoda conditions). This will:
sniff and sniff-fix commands will auto-correct most issues, and we can fail builds in CI/CD for violations. This shifts repetitive work to the tool, letting us focus on architecture and business logic."*For Developers: *"This is like PHP’s ESLint + Prettier combo—but for our team’s exact standards. Here’s how it helps you:
use_underscores_in_namespacesyoda_conditions (e.g., if (1 === $x))lowerCamelCase variables.make sniff before commits to catch issues early.make sniff-fix to auto-correct safe violations.For Technical Architects: *"This package provides a scalable, maintainable way to enforce coding standards in Laravel projects. Key advantages:
--cache flag).UserRepositoryInterface) may conflict with custom rules (e.g., no Interface suffix). We’ll need a strategy to override or exclude these cases.How can I help you explore Laravel packages today?