protected function filter($result, $choices)
    {
        foreach ($choices as $key => $regex) {
            if ($result->is($key) and stripos($key, 'generic') === false) {
                return $key;
            }
        }

        return null;
    }
protected function filter($result, $choices)
    {
        foreach ($choices as $key => $regex) {
            if ($result->is($key) and stripos($key, 'generic') === false) {
                return $key;
            }
        }

        return null;
    }
protected function filter ( $ result , $ choices ) { foreach ( $ choices as $ key => $ regex ) { if ( $ result -> is ( $ key ) and stripos ( $ key , 'generic' ) === false ) { return $ key ; } } return null ; }
Filter through the choices to find the matching one.

@param Mobile_Detect|MobileDetect $result
@param array                      $choices

@return string|null
Filter through the choices to find the matching one .