PSR12
PSR-12 is a PHP coding style guide published by the PHP Framework Interop Group (PHP-FIG) in 2019. It provides a comprehensive set of rules for writing PHP code with a consistent style across projects and is intended to be used alongside PSR-1 Basic Coding Standard and PSR-2 Coding Style Guide. PSR-12 supersedes PSR-2 and reflects modern PHP practices while remaining compatible with established PSR-1 conventions.
PSR-12 expands PSR-2 by embracing features introduced in newer PHP versions, including type declarations, namespace usage,
Key areas addressed by PSR-12 include file structure and ordering of declarations, spacing and indentation, control
Adoption and tooling: there is no runtime enforcement of PSR-12, but projects commonly use static analyzers