src/CFDIReader/PostValidations/Issues.php
public function all(): array
    {
        $contents = [];
        foreach ($this->messages as $type => $messages) {
            if ($messages->count()) {
                $contents[$type] = $messages->all();
            }
        }
        return $contents;
    }
public function all(): array
    {
        $contents = [];
        foreach ($this->messages as $type => $messages) {
            if ($messages->count()) {
                $contents[$type] = $messages->all();
            }
        }
        return $contents;
    }
Return an array that contains all messages by type only if they contain a message
[
'errors' => [...]
'warnings' => [...]
]
@return array