| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function __construct(ElementIterator $elements, string $attr, string $pattern, bool $invert = false) |
||
| 34 | { |
||
| 35 | parent::__construct($elements, $attr); |
||
| 36 | |||
| 37 | if (false === preg_match("$pattern", '')) { |
||
| 38 | throw new InvalidArgumentException("Invalid pcre pattern '$pattern'."); |
||
| 39 | } |
||
| 40 | |||
| 41 | $this->pattern = $pattern; |
||
| 42 | $this->invert = $invert; |
||
| 43 | } |
||
| 44 | |||
| 50 |