# Code Style & Conventions

## PHP
- PHP 7.4 compatibility required
- New controllers: `Controllers\{Module}Controller` with camelCase methods
- New domain: `Domain\{Module}\{Name}Repository` with constructor-injected $mdb
- Legacy: `controls\{Module}` and `factory\{Module}` with snake_case
- Templates via `\Tpl::view('module/template', $data_array)`
- XSS protection via `\Tpl::secureHTML()`
- UI language: Polish

## File Naming
- New: `ClassName.php`
- Legacy: `class.ClassName.php`

## Spacing Style (from existing code)
- Spaces inside brackets: `$arr[ 'key' ]`, `func( $arg )`
- Allman-ish brace style with opening brace on same line
