Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| ListType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| values | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Wikimedia\Message; |
| 4 | |
| 5 | /** |
| 6 | * The constants used to specify list types. The values of the constants are an |
| 7 | * unstable implementation detail. |
| 8 | */ |
| 9 | enum ListType: string { |
| 10 | /** A comma-separated list */ |
| 11 | case COMMA = 'comma'; |
| 12 | |
| 13 | /** A semicolon-separated list */ |
| 14 | case SEMICOLON = 'semicolon'; |
| 15 | |
| 16 | /** A pipe-separated list */ |
| 17 | case PIPE = 'pipe'; |
| 18 | |
| 19 | /** A natural-language list separated by "and" */ |
| 20 | case AND = 'text'; |
| 21 | |
| 22 | /** |
| 23 | * Return the ListTypes, as an array of string flag values. |
| 24 | * @return list<string> |
| 25 | */ |
| 26 | public static function values(): array { |
| 27 | return array_column( self::cases(), 'value' ); |
| 28 | } |
| 29 | } |