src/AbstractDetection.php
protected function detectByPattern(array $patternList)
    {
        foreach ($patternList as $patternId => $patternData) {
            $pattern = $this->getPattern($patternId, $patternData);

            if (preg_match($pattern['pattern'], $this->detector->getUserAgent())) {
                return ['name' => $patternId, 'version' => Tools::getVersion($pattern['version'], $this->detector->getUserAgent()), 'originalInfo' => $patternData];
            }
        }
        return null;
    }
protected function detectByPattern(array $patternList)
    {
        foreach ($patternList as $patternId => $patternData) {
            $pattern = $this->getPattern($patternId, $patternData);

            if (preg_match($pattern['pattern'], $this->detector->getUserAgent())) {
                return ['name' => $patternId, 'version' => Tools::getVersion($pattern['version'], $this->detector->getUserAgent()), 'originalInfo' => $patternData];
            }
        }
        return null;
    }
Detect by pattern
@param array $patternList list of patterns
@return array|null