Files
app/api/config.php
Simon 5ef6fc8064 refactor: odstraneni PSR-1 SideEffects warningu
- Handler funkce extrahovany z API souboru do api/admin/handlers/
- config.php rozdeleny na helpers.php (funkce) a constants.php (konstanty)
- require_once odstranen z class souboru (AuditLog, JWTAuth, LeaveNotification)
- vendor/autoload.php presunuto do config.php bootstrap
- totp-handlers.php: pridany use deklarace pro TwoFactorAuth
- phpstan.neon: bootstrapFiles, scanDirectories, dynamicConstantNames
- Opraveny chybejici routing bloky v totp.php a session.php

Vysledek: phpcs 0 errors 0 warnings, PHPStan 0 errors, ESLint 0 errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:29:21 +01:00

26 lines
543 B
PHP

<?php
/**
* BOHA Automation - API Configuration Bootstrap
*
* Nacte helper funkce, env promenne a konstanty.
* Toto je jediny soubor, ktery API endpointy musi require_once.
*/
declare(strict_types=1);
require_once __DIR__ . '/includes/helpers.php';
require_once dirname(__DIR__) . '/vendor/autoload.php';
loadEnv(__DIR__ . '/.env');
require_once __DIR__ . '/includes/constants.php';
if (DEBUG_MODE) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
} else {
error_reporting(0);
ini_set('display_errors', 0);
}