Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare( strict_types=1 ); |
||
8 | abstract class Element { |
||
9 | /** |
||
10 | * Return a regex for matching the name of the element |
||
11 | * |
||
12 | * @param string $delimiter |
||
13 | * @return string |
||
14 | */ |
||
15 | abstract public function getRegex( string $delimiter = '/' ) : string; |
||
16 | |||
17 | /** |
||
18 | * Get a regex matching any element in the given array |
||
19 | * |
||
20 | * @param self[] $elements |
||
21 | * @param string $delimiter |
||
22 | * @return string |
||
23 | * @todo Is this the right place? |
||
24 | */ |
||
25 | public static function regexFromArray( array $elements, string $delimiter = '/' ) : string { |
||
33 |