public function setMatchType($matchType) { if ($matchType !== self::MATCH_SUBSEQUENCE && $matchType !== self::MATCH_HEAD) { throw new \InvalidArgumentException('Wrong match type'); } $this->matchType = $matchType; }