| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 523 | public function __construct(Pattern ...$patterns) |
|
| 20 | { |
||
| 21 | 523 | $this->patterns = $patterns; |
|
| 22 | |||
| 23 | $patterns = array_map(function (Pattern $word) : string { |
||
| 24 | 523 | return $word->getPattern(); |
|
| 25 | 523 | }, $this->patterns); |
|
| 26 | |||
| 27 | 523 | $this->regex = '/^(?:' . implode('|', $patterns) . ')$/i'; |
|
| 28 | 523 | } |
|
| 35 |