original_string: public function isSocialUrl($url, $socialName = false)
      {
          foreach ($this->getDefinitions() as $domain => $name) {
  
              if (preg_match('/(^|[\.\/])'.$domain.'([\.\/]|$)/', $url) && ($socialName === false || $name == $socialName)) {
  
                  return true;
              }
          }
  
          return false;
      }
code: public function isSocialUrl($url, $socialName = false)
      {
          foreach ($this->getDefinitions() as $domain => $name) {
  
              if (preg_match('/(^|[\.\/])'.$domain.'([\.\/]|$)/', $url) && ($socialName === false || $name == $socialName)) {
  
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function isSocialUrl ( $ url , $ socialName = false ) { foreach ( $ this -> getDefinitions ( ) as $ domain => $ name ) { if ( preg_match ( '/(^|[\.\/])' . $ domain . '([\.\/]|$)/' , $ url ) && ( $ socialName === false || $ name == $ socialName ) ) { return true ; } } return false ; }
docstring: Returns true if a URL belongs to a social network, false if otherwise.
  
  @param string $url The URL to check.
  @param string|bool $socialName The social network's name to check for, or false to check
  for any.
  @return bool
docstring_tokens: Returns true if a URL belongs to a social network false if otherwise .