<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Manifest;

final class ManifestValidator
{
    public function validate(ManifestRecord $manifest): array
    {
        $errors = [];

        if ($manifest->id() === '') {
            $errors[] = 'Manifest id is required.';
        }

        if ($manifest->type() === '') {
            $errors[] = 'Manifest type is required.';
        }

        if ($manifest->label() === '') {
            $errors[] = 'Manifest label is required.';
        }

        if ($manifest->version() === '') {
            $errors[] = 'Manifest version is required.';
        }

        return $errors;
    }
}
