Total Complexity | 4 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | enum C14N: string |
||
11 | { |
||
12 | case INCLUSIVE_WITH_COMMENTS = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments'; |
||
13 | case INCLUSIVE_WITHOUT_COMMENTS = 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'; |
||
14 | case EXCLUSIVE_WITH_COMMENTS = 'http://www.w3.org/2001/10/xml-exc-c14n#WithComments'; |
||
15 | case EXCLUSIVE_WITHOUT_COMMENTS = 'http://www.w3.org/2001/10/xml-exc-c14n#'; |
||
16 | |||
17 | /** |
||
18 | * @return bool |
||
19 | */ |
||
20 | public function withComments(): bool |
||
21 | { |
||
22 | return match ($this) { |
||
23 | C14N::INCLUSIVE_WITH_COMMENTS, C14N::EXCLUSIVE_WITH_COMMENTS => true, |
||
24 | default => false, |
||
25 | }; |
||
26 | } |
||
27 | |||
28 | |||
29 | /** |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function withoutComments(): bool |
||
33 | { |
||
34 | return match ($this) { |
||
35 | C14N::INCLUSIVE_WITHOUT_COMMENTS, C14N::EXCLUSIVE_WITHOUT_COMMENTS => true, |
||
36 | default => false, |
||
37 | }; |
||
38 | } |
||
39 | |||
40 | |||
41 | /** |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function exclusive(): bool |
||
49 | }; |
||
50 | } |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function inclusive(): bool |
||
61 | }; |
||
62 | } |
||
63 | } |
||
64 |