Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
IsTopLevelDomain
50.00% covered (danger)
50.00%
1 / 2
50.00% covered (danger)
50.00%
1 / 2
2.50
0.00% covered (danger)
0.00%
0 / 1
 getData
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isActive
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2namespace Apie\IanaValueObjects\TopLevelDomain;
3
4use Apie\IanaValueObjects\IsSanitizingInput;
5use Apie\IanaValueObjects\StaticDataValueObject;
6
7trait IsTopLevelDomain
8{
9    use StaticDataValueObject, IsSanitizingInput {
10        IsSanitizingInput::convert insteadof StaticDataValueObject;
11    }
12
13    protected static function getData(): array
14    {
15        return require __DIR__ . '/../../fixtures/tlds.php';
16    }
17
18    public function isActive(): bool
19    {
20        return (bool) $this->getFieldValue('Active');
21    }
22}