original_string: public static function getProviderById($providerId)
      {
          foreach (self::getAllProviders() as $provider) {
              if ($provider->getId() == $providerId && $provider->isAvailable()) {
                  return $provider;
              }
          }
          
          return null;
      }
code: public static function getProviderById($providerId)
      {
          foreach (self::getAllProviders() as $provider) {
              if ($provider->getId() == $providerId && $provider->isAvailable()) {
                  return $provider;
              }
          }
          
          return null;
      }
code_tokens: public static function getProviderById ( $ providerId ) { foreach ( self :: getAllProviders ( ) as $ provider ) { if ( $ provider -> getId ( ) == $ providerId && $ provider -> isAvailable ( ) ) { return $ provider ; } } return null ; }
docstring: Returns a provider instance by ID or false if the ID is invalid or unavailable.
  
  @param string $providerId
  @return \Piwik\Plugins\UserCountry\LocationProvider|null
docstring_tokens: Returns a provider instance by ID or false if the ID is invalid or unavailable .