Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
GroupOlxXmlBuildException
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 emptyFeed
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 invalidUtf8
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 serializationFailed
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace ImovelZapAi\Publishing\Connectors\GroupOlx\Domain\Exceptions;
6
7use RuntimeException;
8
9final class GroupOlxXmlBuildException extends RuntimeException
10{
11    public static function emptyFeed(): self
12    {
13        return new self('Feed VRSync deve conter ao menos um imóvel.');
14    }
15
16    public static function invalidUtf8(): self
17    {
18        return new self('XML VRSync deve estar em UTF-8 válido.');
19    }
20
21    public static function serializationFailed(string $reason): self
22    {
23        return new self("Falha ao gerar XML VRSync: {$reason}");
24    }
25}