| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 512 | private function getRegex() : string |
|
| 30 | { |
||
| 31 | 512 | if ($this->regex === null) { |
|
| 32 | $patterns = array_map(function (Pattern $word) : string { |
||
| 33 | 512 | return $word->getPattern(); |
|
| 34 | 512 | }, $this->patterns); |
|
| 35 | |||
| 36 | 512 | $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; |
|
| 37 | } |
||
| 38 | |||
| 39 | 512 | return $this->regex; |
|
| 40 | } |
||
| 42 |