| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 152 | 421 | private function getRegex() : string |
|
| 153 | { |
||
| 154 | 421 | if ($this->regex === null) { |
|
| 155 | $words = array_map(function (Word $word) { |
||
| 156 | 421 | return $word->getWord(); |
|
| 157 | 421 | }, $this->words); |
|
| 158 | |||
| 159 | 421 | $this->regex = '(?:' . implode('|', $words) . ')'; |
|
| 160 | } |
||
| 161 | |||
| 162 | 421 | return $this->regex; |
|
| 163 | } |
||
| 165 |