protected function matchPart($value, array $patterns)
    {
        foreach ($patterns as $key => $pattern) {
            if (preg_match($pattern, $value) === 1) {
                $this->messenger->add(new StringType($key));
                return true;
            }
        }

        return false;
    }