protected function errorsToArray(): array
    {
        $errors = [];

        foreach ($this->errors as $error)
        {
            $errors[] = $error->toArray();
        }

        return $errors;
    }