original_string: private function addElement($elem, $to_add)
      {
          //debug_var_dump("to_add->$elem", $to_add->$elem);
          if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){
              $elem_to_add = str_replace('&', '-and-', $to_add->$elem); //replace amperstamps for -and-
              if (!in_array($elem_to_add, $this->$elem)) {
                  array_push($this->$elem, $elem_to_add);
                  //debug_var_dump("this->$elem", $this->$elem);
              }
          }
      }
code: private function addElement($elem, $to_add)
      {
          //debug_var_dump("to_add->$elem", $to_add->$elem);
          if (isset($to_add->$elem) && !empty($to_add->$elem) && $to_add->$elem != ' ') {//&& !empty(str_replace(' ', '', $to_add->$elem)) ){
              $elem_to_add = str_replace('&', '-and-', $to_add->$elem); //replace amperstamps for -and-
              if (!in_array($elem_to_add, $this->$elem)) {
                  array_push($this->$elem, $elem_to_add);
                  //debug_var_dump("this->$elem", $this->$elem);
              }
          }
      }
code_tokens: private function addElement ( $ elem , $ to_add ) { //debug_var_dump("to_add->$elem", $to_add->$elem); if ( isset ( $ to_add -> $ elem ) && ! empty ( $ to_add -> $ elem ) && $ to_add -> $ elem != ' ' ) { //&& !empty(str_replace(' ', '', $to_add->$elem)) ){ $ elem_to_add = str_replace ( '&' , '-and-' , $ to_add -> $ elem ) ; //replace amperstamps for -and- if ( ! in_array ( $ elem_to_add , $ this -> $ elem ) ) { array_push ( $ this -> $ elem , $ elem_to_add ) ; //debug_var_dump("this->$elem", $this->$elem); } } }
docstring: adds a db element only if it is new
docstring_tokens: adds a db element only if it is new