Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
_HttpXData
100.00% covered (success)
100.00%
14 / 14
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getLocalXCodes
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
 getXMessageTemplates
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @author: Doug Wilbourne (dougwilbourne@gmail.com)
5 * @noinspection PhpCSValidationInspection
6 */
7declare(strict_types=1);
8
9namespace pvc\http\err;
10
11use pvc\err\XDataAbstract;
12
13/**
14 * Class _ParserXData
15 */
16class _HttpXData extends XDataAbstract
17{
18
19    public function getLocalXCodes(): array
20    {
21        return [
22            MimeTypeCdnException::class => 1005,
23            MimeTypesJsonDecodingException::class => 1006,
24            MimeTypesUnreadableStreamException::class => 1007,
25            UnknownMimeTypeDetectedException::class => 1009,
26            InvalidHttpVerbException::class => 1017,
27        ];
28    }
29
30    public function getXMessageTemplates(): array
31    {
32        return [
33            MimeTypeCdnException::class => 'runtime exception: cdn ${cdn} containing mime types in not currently available.',
34            MimeTypesJsonDecodingException::class => 'Error decoding json string into MimeTypes object.',
35            MimeTypesUnreadableStreamException::class => 'Unable to read stream or unable to detect mime type of sdtream.',
36            UnknownMimeTypeDetectedException::class => 'Unknown mime type detected from php function mime_content_type in stream.',
37            InvalidHttpVerbException::class => 'Invalid HTTP verb ${badHttpVerb} provided.',
38        ];
39    }
40}