| Conditions | 2 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | 23 | public function compile(array &$arguments) { |
|
| 53 | 23 | assert('$this->arguments_are_valid($arguments)'); |
|
| 54 | 23 | $regexp = $arguments[0]; |
|
| 55 | 23 | return function (Node $n) use ($regexp) { |
|
| 56 | 22 | return $n->has_property("name") |
|
| 57 | 22 | && preg_match("%^$regexp\$%", $n->property("name")) == 1; |
|
| 58 | 23 | }; |
|
| 59 | } |
||
| 60 | } |
||
| 61 |