<?php

declare(strict_types=1);

final class StaffService
{
    public static function currentTasks(int $staffId): array
    {
        $pdo = Api::pdo();
        $stmt = $pdo->prepare('CALL GetStaffTasks(:staff_id)');
        $stmt->execute(['staff_id' => $staffId]);
        $rows = $stmt->fetchAll();
        $stmt->closeCursor();
        return $rows;
    }
}
