<?php

namespace App\Validation;

use CodeIgniter\Database\BaseConnection;

class ReportRules
{
    public static function checkReportExists($str, ?string $fields = null, array $data = [], ?BaseConnection &$db = null): bool
    {
        $db = $db ?? \Config\Database::connect();
        return $db->table('reports')->where('id', $str)->countAllResults() > 0;
    }
}
