original_string: public function getWeight(\DOMElement $e)
      {
          if (!$this->flagIsActive(self::FLAG_WEIGHT_ATTRIBUTES)) {
              return 0;
          }
  
          $weight = 0;
          // Look for a special classname
          $weight += $this->weightAttribute($e, 'class');
          // Look for a special ID
          $weight += $this->weightAttribute($e, 'id');
  
          return $weight;
      }
code: public function getWeight(\DOMElement $e)
      {
          if (!$this->flagIsActive(self::FLAG_WEIGHT_ATTRIBUTES)) {
              return 0;
          }
  
          $weight = 0;
          // Look for a special classname
          $weight += $this->weightAttribute($e, 'class');
          // Look for a special ID
          $weight += $this->weightAttribute($e, 'id');
  
          return $weight;
      }
code_tokens: public function getWeight ( \ DOMElement $ e ) { if ( ! $ this -> flagIsActive ( self :: FLAG_WEIGHT_ATTRIBUTES ) ) { return 0 ; } $ weight = 0 ; // Look for a special classname $ weight += $ this -> weightAttribute ( $ e , 'class' ) ; // Look for a special ID $ weight += $ this -> weightAttribute ( $ e , 'id' ) ; return $ weight ; }
docstring: Get an element relative weight.
  
  @param \DOMElement $e
  
  @return int
docstring_tokens: Get an element relative weight .