| Total Complexity | 4 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class RegExpTag extends AbstractTag |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $regexp; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Class constructor |
||
| 22 | * |
||
| 23 | * @param string $name |
||
| 24 | * @param string $regexp |
||
| 25 | */ |
||
| 26 | 5 | public function __construct(string $name, string $regexp) |
|
| 27 | { |
||
| 28 | 5 | parent::__construct($name); |
|
| 29 | |||
| 30 | 5 | $this->regexp = $regexp; |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Get the regular expression |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 1 | public function getRegExp(): string |
|
| 39 | { |
||
| 40 | 1 | return $this->regexp; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Process a notation |
||
| 45 | * |
||
| 46 | * @param array $notations |
||
| 47 | * @param string $value |
||
| 48 | * @return array |
||
| 49 | */ |
||
| 50 | 4 | public function process(array $notations, string $value): array |
|
| 59 | } |
||
| 60 | } |
||
| 61 |