Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
CRAP | |
100.00% |
1 / 1 |
| IsMediaType | |
100.00% |
5 / 5 |
|
100.00% |
5 / 5 |
5 | |
100.00% |
1 / 1 |
| getData | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getTemplate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getReference | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isActive | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\IanaValueObjects\MediaType; |
| 3 | |
| 4 | use Apie\IanaValueObjects\StaticDataValueObject; |
| 5 | |
| 6 | trait IsMediaType |
| 7 | { |
| 8 | use StaticDataValueObject; |
| 9 | |
| 10 | protected static function getData(): array |
| 11 | { |
| 12 | return require __DIR__ . '/../../fixtures/media-types.php'; |
| 13 | } |
| 14 | |
| 15 | public function getName(): string |
| 16 | { |
| 17 | return $this->getFieldValue('Name'); |
| 18 | } |
| 19 | |
| 20 | public function getTemplate(): string |
| 21 | { |
| 22 | return $this->getFieldValue('Template'); |
| 23 | } |
| 24 | |
| 25 | public function getReference(): string |
| 26 | { |
| 27 | return $this->getFieldValue('Reference'); |
| 28 | } |
| 29 | |
| 30 | public function isActive(): bool |
| 31 | { |
| 32 | return (bool) $this->getFieldValue('Active'); |
| 33 | } |
| 34 | } |