Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
20 | final class RequesterID extends AbstractSamlpElement implements SchemaValidatableElementInterface |
||
21 | { |
||
22 | use SchemaValidatableElementTrait; |
||
23 | use URIElementTrait; |
||
|
|||
24 | |||
25 | |||
26 | /** |
||
27 | * @param string $content |
||
28 | */ |
||
29 | public function __construct(string $content) |
||
32 | } |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Create a class from an array |
||
37 | * |
||
38 | * @param array $data |
||
39 | * @return static |
||
40 | */ |
||
41 | public static function fromArray(array $data): static |
||
42 | { |
||
43 | Assert::allString($data, ArrayValidationException::class); |
||
44 | |||
45 | $index = array_key_first($data); |
||
46 | return new static($data[$index]); |
||
47 | } |
||
48 | |||
49 | |||
50 | /** |
||
51 | * Create an array from this class |
||
52 | * |
||
53 | * @return array |
||
54 | */ |
||
55 | public function toArray(): array |
||
58 | } |
||
59 | } |
||
60 |