Lines 100.00% 2 / 2
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 missingRequiredField 100.00% 1 / 1 100.00% 1 / 1 1
 malformedContent 100.00% 1 / 1 100.00% 1 / 1 1
10final class InvalidEmailFormatException extends ParseException
11{
12    public static function missingRequiredField(string $parserClass, string $fieldName, ?\Throwable $previous = null): self
13    {
14        return new self(sprintf('Parser %s: required field "%s" is missing or invalid', $parserClass, $fieldName), 0, $previous);
15    }
16
17    public static function malformedContent(string $parserClass, string $reason, ?\Throwable $previous = null): self
18    {
19        return new self(sprintf('Parser %s: %s', $parserClass, $reason), 0, $previous);
20    }
21}