feat: P4 backend kvalita - SELECT * fix, overdue konsolidace, Validator
- SELECT * nahrazen explicitnimi sloupci ve 22 PHP souborech (69+ vyskytu) - users-handlers.php: password_hash explicitne vyloucen z dotazu - Overdue detekce presunuta do invoices.php routeru (1x pred dispatch misto 3x v handlerech) - Validator.php: validacni helper s pravidly required, string, int, email, in, numeric - PaginationHelper: PHPStan typy opraveny Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,11 @@ declare(strict_types=1);
|
||||
|
||||
function handleGetBankAccountList(PDO $pdo): void
|
||||
{
|
||||
$stmt = $pdo->query('SELECT * FROM bank_accounts ORDER BY position, id');
|
||||
$stmt = $pdo->query(
|
||||
'SELECT id, account_name, bank_name, account_number, iban, bic,
|
||||
currency, is_default, position, created_at, modified_at
|
||||
FROM bank_accounts ORDER BY position, id'
|
||||
);
|
||||
successResponse($stmt->fetchAll());
|
||||
}
|
||||
|
||||
@@ -78,7 +82,11 @@ function handleCreateBankAccount(PDO $pdo): void
|
||||
|
||||
function handleUpdateBankAccount(PDO $pdo, int $id): void
|
||||
{
|
||||
$stmt = $pdo->prepare('SELECT * FROM bank_accounts WHERE id = ?');
|
||||
$stmt = $pdo->prepare(
|
||||
'SELECT id, account_name, bank_name, account_number, iban, bic,
|
||||
currency, is_default, position
|
||||
FROM bank_accounts WHERE id = ?'
|
||||
);
|
||||
$stmt->execute([$id]);
|
||||
$account = $stmt->fetch();
|
||||
|
||||
@@ -145,7 +153,7 @@ function handleUpdateBankAccount(PDO $pdo, int $id): void
|
||||
|
||||
function handleDeleteBankAccount(PDO $pdo, int $id): void
|
||||
{
|
||||
$stmt = $pdo->prepare('SELECT * FROM bank_accounts WHERE id = ?');
|
||||
$stmt = $pdo->prepare('SELECT id, account_name FROM bank_accounts WHERE id = ?');
|
||||
$stmt->execute([$id]);
|
||||
$account = $stmt->fetch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user