spatie-guidelines
Installation
SKILL.md
Spatie Guidelines
Apply these guidelines when writing code for Spatie projects or contributing to Spatie packages.
Core principle: Write things the way Laravel intended. If there's a documented way, follow it. Deviate only with justification.
PHP Style
Type System
- Type properties, parameters, and return types. Skip docblocks for fully typed methods.
- Use
?Type(short nullable), notType|null. - Use
voidreturn type when a method returns nothing. - Use constructor property promotion when all properties can be promoted; one per line, trailing comma: