| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class SchemaLocationPartsNotEvenException extends RuntimeException implements XmlSchemaValidatorException |
||
| 10 | { |
||
| 11 | /** @var string[] */ |
||
| 12 | private $parts; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * SchemaLocationPartsNotEvenException constructor. |
||
| 16 | * |
||
| 17 | * @param string $message |
||
| 18 | * @param string[] $parts |
||
| 19 | */ |
||
| 20 | 1 | private function __construct(string $message, array $parts) |
|
| 21 | { |
||
| 22 | 1 | parent::__construct($message); |
|
| 23 | 1 | $this->parts = $parts; |
|
| 24 | 1 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param string[] $parts |
||
| 28 | * @return self |
||
| 29 | */ |
||
| 30 | 1 | public static function create(array $parts): self |
|
| 31 | { |
||
| 32 | 1 | return new self('The schemaLocation attribute does not have even parts', $parts); |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Return the parts found on the schemaLocations attribute |
||
| 37 | * |
||
| 38 | * @return string[] |
||
| 39 | */ |
||
| 40 | 1 | public function getParts(): array |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Return the parts found on the schemaLocations attribute separated by a space |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | 1 | public function getPartsAsString(): string |
|
| 53 | } |
||
| 54 | } |
||
| 55 |