- Indent with exactly 4 spaces per level; never use tabs.
- Use only Unix LF line endings.
- Place opening braces for classes, traits, interfaces, and functions on a new line after the declaration.
- Place opening braces for control structures (if, for, while, etc.) on the same line as the keyword.
- Use single spaces before and after operators, keywords, and commas; no space before opening parenthesis or after closing parenthesis.
- Position `declare(strict_types=1);` immediately after `<?php` opening tag if used, followed by a blank line before namespace, to standardize file headers and enable strict type checking.
- Declare namespace on its own line after header declarations, followed by a blank line before `use` statements, ensuring compatibility with PSR-4 autoloading.
- Group and alphabetize `use` statements by type (classes/functions/constants first), with blank lines separating groups, for improved navigation and maintenance.
- Align continuation lines in multi-line statements to match the indentation of the opening structure, enhancing readability in complex expressions.