php-quality

Featured

PHP code quality: PSR standards, strict types, framework idioms.

AI & Automation 412 stars 42 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# PHP Quality Skill PHP code quality enforcement: strict types, PSR-12 compliance, modern language features, framework idioms, and static analysis tooling. ## Reference Loading Table | Signal | Reference | Size | |--------|-----------|------| | union types, intersection types, DNF, enums, readonly, named arguments, match expression, null-safe operator, PHP 8.0, PHP 8.1, PHP 8.2 | `references/modern-php-features.md` | ~160 lines | | Laravel, Eloquent, Collections, Service Container, Symfony, DI attributes, Event Dispatcher, framework | `references/framework-idioms.md` | ~70 lines | | PHP-CS-Fixer, PHPStan, Psalm, Rector, static analysis, CI, linting, code style, taint analysis | `references/quality-tools.md` | ~60 lines | **Loading rule.** Read the references whose signals match the task before responding. --- ## Core Rules (Always Apply) ### Strict Types Declaration Every PHP file must begin with `declare(strict_types=1)`. This enforces scalar type coercion rules, catching type errors at call time instead of silently converting values. ```php <?php declare(strict_types=1); // Without strict_types: strlen(123) silently returns 3 // With strict_types: strlen(123) throws TypeError ``` This is non-negotiable. Omitting it is a code quality defect. ### PSR-12 Coding Standard PSR-12 extends PSR-1 and PSR-2 as the accepted PHP coding style. Key rules: - 4-space indentation, no trailing whitespace - One class per file - `use` statements after namespace with a blank line...

Details

Author
notque
Repository
notque/vexjoy-agent
Created
4 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category