original_string: protected function addClass($addClass) {
          $targetClass = $this->getAttrib('class');
          if(!empty($targetClass) && (strpos($targetClass, $addClass) === false)) {
              $targetClass .= " {$addClass}";
          } else {
              $targetClass = $addClass;
          }
          $this->setAttrib('class', $targetClass);
          return $this;
      }
code: protected function addClass($addClass) {
          $targetClass = $this->getAttrib('class');
          if(!empty($targetClass) && (strpos($targetClass, $addClass) === false)) {
              $targetClass .= " {$addClass}";
          } else {
              $targetClass = $addClass;
          }
          $this->setAttrib('class', $targetClass);
          return $this;
      }
code_tokens: protected function addClass ( $ addClass ) { $ targetClass = $ this -> getAttrib ( 'class' ) ; if ( ! empty ( $ targetClass ) && ( strpos ( $ targetClass , $ addClass ) === false ) ) { $ targetClass .= " {$addClass}" ; } else { $ targetClass = $ addClass ; } $ this -> setAttrib ( 'class' , $ targetClass ) ; return $ this ; }
docstring: Add a class to an existing class, taking care of spacing
  @param string $targetClass  The existing class
  @param string $addClass    the Class or classes to add, seperated by spaces
docstring_tokens: Add a class to an existing class taking care of spacing