| Total Complexity | 1 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Punctuation extends Enum |
||
|
|
|||
| 10 | { |
||
| 11 | public const OPEN_QUOTE = "open-quote"; |
||
| 12 | public const CLOSE_QUOTE = "close-quote"; |
||
| 13 | public const OPEN_INNER_QUOTE = "open-inner-quote"; |
||
| 14 | public const CLOSE_INNER_QUOTE = "close-inner-quote"; |
||
| 15 | public const PAGE_RANGE_DELIMITER = "page-range-delimiter"; |
||
| 16 | public const COLON = "colon"; |
||
| 17 | public const COMMA = "comma"; |
||
| 18 | public const SEMICOLON = "semicolon"; |
||
| 19 | |||
| 20 | 9 | public static function getAllPunctuations(): array |
|
| 21 | { |
||
| 22 | 9 | $values = new ArrayList(); |
|
| 23 | return $values |
||
| 24 | 9 | ->setArray(Punctuation::toArray()) |
|
| 25 | ->map(function (string $punctuation) { |
||
| 26 | 9 | return CiteProc::getContext()->getLocale()->filter("terms", $punctuation)->single; |
|
| 27 | 9 | }) |
|
| 28 | ->collect(function ($items) { |
||
| 29 | 9 | return array_values($items); |
|
| 30 | 9 | }); |
|
| 33 |