<?php

namespace App\Services\Certification;

abstract class BaseCertification
implements CertificationContract
{
    protected static function pass(
        array $meta = []
    ): array {

        return CertificationResult::pass(
            static::module(),
            $meta
        );

    }

    protected static function warning(
        int $score,
        array $warnings,
        array $meta = []
    ): array {

        return CertificationResult::warning(
            static::module(),
            $score,
            $warnings,
            $meta
        );

    }

    protected static function fail(
        array $errors,
        array $warnings = [],
        array $meta = []
    ): array {

        return CertificationResult::fail(
            static::module(),
            $errors,
            $warnings,
            $meta
        );

    }
}
