wol-soft/php-json-schema-model-generator-production

View on GitHub
src/Exception/ErrorRegistryExceptionInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%
<?php

declare(strict_types = 1);

namespace PHPModelGenerator\Exception;

use Throwable;

/**
 * Interface ErrorRegistryExceptionInterface
 *
 * @package PHPModelGeneratorException
 */
interface ErrorRegistryExceptionInterface extends Throwable
{
    /**
     * Add an error to the error registry
     *
     * @param ValidationException $exception
     *
     * @return $this
     */
    public function addError(ValidationException $exception): self;

    /**
     * Get all errors
     *
     * @return ValidationException[]
     */
    public function getErrors(): array;
}