| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | public function match($value) |
||
| 45 | { |
||
| 46 | if (false === is_string($value)) { |
||
| 47 | $this->error = sprintf("Match expander require \"string\", got \"%s\".", new StringConverter($value)); |
||
| 48 | |||
| 49 | return false; |
||
| 50 | } |
||
| 51 | |||
| 52 | if (1 !== preg_match($this->pattern, $value)) { |
||
| 53 | $this->error = sprintf("string \"%s\" don't match pattern %s.", $value, $this->pattern); |
||
| 54 | |||
| 55 | return false; |
||
| 56 | } |
||
| 57 | |||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 69 |