<?php

declare(strict_types=1);

final class CustomerService
{
    public static function latestRequests(int $customerId): array
    {
        $pdo = Api::pdo();
        $stmt = $pdo->prepare('CALL GetCustomerRequests(:customer_id)');
        $stmt->execute(['customer_id' => $customerId]);
        $rows = $stmt->fetchAll();
        $stmt->closeCursor();
        return $rows;
    }
}
