# Code Style & Conventions: kontrans.pagedev.pl

## PHP Style
- PHP 7.x style (no strict types declaration)
- Error reporting: E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED (suppressed in production)
- Class files named: `class.ClassName.php`
- Namespaces use backslash: `front\factory\Pages`, `admin\controls\Site`
- No Composer/PSR-4 autoload — custom `spl_autoload_register`
- Static helper class `\S` for session/get/post/utility methods
- Spacing: spaces around operators, spaces after `if`/`for`/`foreach`
- Braces on same line for control structures
- Arrow style: `->` with spaces around it

## Naming
- Classes: PascalCase (e.g. `Pages`, `Articles`, `Newsletter`)
- Methods: snake_case (e.g. `page_details()`, `default_language()`)
- Variables: snake_case
- Database tables: prefixed with `pp_` (e.g. `pp_settings`, `pp_pages`)

## Templates
- PHP templates with inline HTML
- Template files in `templates/` and `templates_user/`
- Template engine: custom `\Tpl` class

## JavaScript
- jQuery-based
- Custom functions in `libraries/functions.js` and `libraries/functions-front.js`
- No module bundler (plain JS files)
