original_string: public function getRelation($name, $use_alias = false)
      {
          if ($use_alias) {
              foreach ($this->relations as $relation) {
                  if (0 === strcasecmp($name, $relation->getName($use_alias))) {
                      return $relation;
                  }
              }
          } else {
              $key = strtolower($name);
              if (isset($this->relations[$key])) {
                  return $this->relations[$key];
              }
          }
  
          return null;
      }
code: public function getRelation($name, $use_alias = false)
      {
          if ($use_alias) {
              foreach ($this->relations as $relation) {
                  if (0 === strcasecmp($name, $relation->getName($use_alias))) {
                      return $relation;
                  }
              }
          } else {
              $key = strtolower($name);
              if (isset($this->relations[$key])) {
                  return $this->relations[$key];
              }
          }
  
          return null;
      }
code_tokens: public function getRelation ( $ name , $ use_alias = false ) { if ( $ use_alias ) { foreach ( $ this -> relations as $ relation ) { if ( 0 === strcasecmp ( $ name , $ relation -> getName ( $ use_alias ) ) ) { return $ relation ; } } } else { $ key = strtolower ( $ name ) ; if ( isset ( $ this -> relations [ $ key ] ) ) { return $ this -> relations [ $ key ] ; } } return null ; }
docstring: Gets the named relation metadata.
  
  @param string $name relation name
  @param bool   $use_alias
  
  @return RelationSchema metadata of the named relation. Null if the named relation does not exist.
docstring_tokens: Gets the named relation metadata .