1.3 KiB
Executable File
1.3 KiB
Executable File
AGENT CODING STANDARDS
This project is a PHP MVC application using Composer, Twig, FastRoute, and SQLite in an LXC container.
🛠️ Development Commands
- Dependencies:
composer install/update(updates after editing composer.json) - Linting: N/A (adhere to PSR-12 manually)
- Testing:
curl localhost(no framework; run manual scripts likephp test.phpfor single tests) - Build: N/A (direct PHP execution)
- Version Control:
git status/add/commit/push
📐 Code Style & Conventions
- Architecture: MVC pattern (Controllers in
src/Controllers/, Models insrc/Models/, Views intemplates/) - Namespacing: PSR-4 with
App\base - Naming: Classes
PascalCase, methods/variablescamelCase - Templating: Twig only (
.twigfiles) - I18n: Use
App\Services\TranslationService(PHP) or{{ trans('ID') }}(Twig) - Error Handling:
try/catchblocks; log witherror_log() - Database: Use
App\Database\Database::getInstance()(no direct PDO) - Imports:
usestatements at top or fully qualified names - Security: No secrets/keys exposure or logging
- Types: Type hints on params/returns where possible
- Formatting: PSR-12
- Comments: Avoid unless requested
- Libraries: Check composer.json before adding