Conditions | 5 |
Paths | 16 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
41 | public function jsonLDSerialize(string $context = self::DEFAULT_CONTEXT) |
||
42 | { |
||
43 | $members = []; |
||
44 | foreach ($this->members as $m) { |
||
45 | $members[] = $m->jsonLDSerialize(''); |
||
46 | } |
||
47 | $json = []; |
||
48 | if ($context) { |
||
49 | $json['@context'] = $context; |
||
50 | } |
||
51 | $json['members'] = $members; |
||
52 | if ($this->ordered) { |
||
53 | $json['ordered'] = true; |
||
54 | } |
||
55 | if ($this->disjunction) { |
||
56 | $json['disjunction'] = true; |
||
57 | } |
||
58 | return $json; |
||
59 | } |
||
60 | } |
||
61 |