| Total Complexity | 4 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Patterns |
||
| 12 | { |
||
| 13 | /** @var Pattern[] */ |
||
| 14 | private $patterns; |
||
| 15 | |||
| 16 | /** @var string|null */ |
||
| 17 | private $regex; |
||
| 18 | |||
| 19 | 530 | public function __construct(Pattern ...$patterns) |
|
| 22 | 530 | } |
|
| 23 | |||
| 24 | 512 | public function isUninflected(string $word) : bool |
|
| 25 | { |
||
| 26 | 512 | return preg_match($this->getRegex(), $word, $regs) === 1; |
|
| 27 | } |
||
| 28 | |||
| 29 | 512 | private function getRegex() : string |
|
| 40 | } |
||
| 41 | } |
||
| 42 |