php-guidelines-from-spatie

Installation
SKILL.md

Core Laravel Principle

Follow Laravel conventions first. If Laravel has a documented way to do something, use it. Only deviate when you have a clear justification.

PHP Standards

  • Follow PSR-1, PSR-2, and PSR-12
  • Use camelCase for non-public-facing strings
  • Use short nullable notation: ?string not string|null
  • Always specify void return types when methods return nothing

Class Structure

  • Use typed properties, not docblocks:
  • Constructor property promotion when all properties can be promoted:
  • One trait per line:

Type Declarations & Docblocks

  • Use typed properties over docblocks
  • Specify return types including void
Related skills

More from freekmurze/dotfiles

Installs
145
GitHub Stars
945
First Seen
Jan 24, 2026