| Conditions | 5 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function match($value, $pattern) |
||
| 27 | { |
||
| 28 | if (parent::match($value, $pattern)) { |
||
| 29 | return true; |
||
| 30 | } |
||
| 31 | |||
| 32 | if (!Xml::isValid($value) || !Xml::isValid($pattern)) { |
||
| 33 | return false; |
||
| 34 | } |
||
| 35 | |||
| 36 | $arrayValue = XML2Array::createArray($value); |
||
| 37 | $arrayPattern = XML2Array::createArray($pattern); |
||
| 38 | |||
| 39 | $match = $this->matcher->match($arrayValue, $arrayPattern); |
||
| 40 | if (!$match) { |
||
| 41 | $this->error = $this->matcher->getError(); |
||
| 42 | return false; |
||
| 43 | } |
||
| 44 | |||
| 45 | return true; |
||
| 46 | } |
||
| 47 | |||
| 56 |