original_string: public static function getCountry($lang, $enableLanguageToCountryGuess, $ip)
      {
          if (empty($lang) || strlen($lang) < 2 || $lang == self::LANGUAGE_CODE_INVALID) {
              return self::LANGUAGE_CODE_INVALID;
          }
  
          /** @var RegionDataProvider $dataProvider */
          $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');
  
          $validCountries = $dataProvider->getCountryList();
  
          return self::extractCountryCodeFromBrowserLanguage($lang, $validCountries, $enableLanguageToCountryGuess);
      }
code: public static function getCountry($lang, $enableLanguageToCountryGuess, $ip)
      {
          if (empty($lang) || strlen($lang) < 2 || $lang == self::LANGUAGE_CODE_INVALID) {
              return self::LANGUAGE_CODE_INVALID;
          }
  
          /** @var RegionDataProvider $dataProvider */
          $dataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');
  
          $validCountries = $dataProvider->getCountryList();
  
          return self::extractCountryCodeFromBrowserLanguage($lang, $validCountries, $enableLanguageToCountryGuess);
      }
code_tokens: public static function getCountry ( $ lang , $ enableLanguageToCountryGuess , $ ip ) { if ( empty ( $ lang ) || strlen ( $ lang ) < 2 || $ lang == self :: LANGUAGE_CODE_INVALID ) { return self :: LANGUAGE_CODE_INVALID ; } /** @var RegionDataProvider $dataProvider */ $ dataProvider = StaticContainer :: get ( 'Piwik\Intl\Data\Provider\RegionDataProvider' ) ; $ validCountries = $ dataProvider -> getCountryList ( ) ; return self :: extractCountryCodeFromBrowserLanguage ( $ lang , $ validCountries , $ enableLanguageToCountryGuess ) ; }
docstring: Returns the visitor country based on the Browser 'accepted language'
  information, but provides a hook for geolocation via IP address.
  
  @param string $lang browser lang
  @param bool $enableLanguageToCountryGuess If set to true, some assumption will be made and detection guessed more often, but accuracy could be affected
  @param string $ip
  @return string  2 letter ISO code
docstring_tokens: Returns the visitor country based on the Browser accepted language information but provides a hook for geolocation via IP address .