<?php

declare(strict_types=1);

namespace Apexl\Io\Validation\PhpValidatorRules;

use BlakvGhost\PHPValidator\Contracts\Rule;

final readonly class ArrayRule implements Rule
{
    public function __construct(array $parameters) {}

    public function passes(string $field, mixed $value, array $data): bool
    {
        return is_array($value);
    }

    public function message(): string
    {
        return ':field must be an array.';
    }
}