Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | declare( strict_types = 1 ); |
| 3 | |
| 4 | namespace Wikimedia\Parsoid\Core; |
| 5 | |
| 6 | /** |
| 7 | * Merge strategies to use for ContentMetadataCollectors. |
| 8 | * |
| 9 | * Strategies should be order-independent, so that portions of the |
| 10 | * final metadata can be generated and combined in any order. |
| 11 | */ |
| 12 | enum MergeStrategy: string { |
| 13 | |
| 14 | /** |
| 15 | * "Union" merge strategy means that values are strings, stored as |
| 16 | * a set, and exposed as a PHP associative array mapping from |
| 17 | * values to `true`. |
| 18 | */ |
| 19 | case UNION = 'union'; |
| 20 | |
| 21 | /** |
| 22 | * "Sum" merge strategy means that values are integers and |
| 23 | * are summed to make the final ParserOutput. |
| 24 | */ |
| 25 | case SUM = 'sum'; |
| 26 | } |