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
UriScheme
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
 requiresActive
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getOptions
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\IanaValueObjects\UriScheme;
3
4use Apie\Core\Lists\StringSet;
5use Apie\Core\ValueObjects\Interfaces\LimitedOptionsInterface;
6use Apie\Core\ValueObjects\Interfaces\StringValueObjectInterface;
7
8/**
9 * All URI schemes registered in the IANA URI Schemes Registry.
10 *
11 * @see https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
12 *
13 * Any URI scheme that is not active/valid anymore (e.g. historical) can be used as well (for data integrity).
14 */
15final class UriScheme implements StringValueObjectInterface, LimitedOptionsInterface
16{
17    use IsUriScheme;
18
19    protected static function requiresActive(): bool
20    {
21        return false;
22    }
23
24    public static function getOptions(): StringSet
25    {
26        return new StringSet(array_keys(static::getData()));
27    }
28}