original_string: public function addCustomer(Customer $l)
      {
          if ($this->collCustomers === null) {
              $this->initCustomers();
              $this->collCustomersPartial = true;
          }
  
          if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
              $this->doAddCustomer($l);
  
              if ($this->customersScheduledForDeletion and $this->customersScheduledForDeletion->contains($l)) {
                  $this->customersScheduledForDeletion->remove($this->customersScheduledForDeletion->search($l));
              }
          }
  
          return $this;
      }
code: public function addCustomer(Customer $l)
      {
          if ($this->collCustomers === null) {
              $this->initCustomers();
              $this->collCustomersPartial = true;
          }
  
          if (!in_array($l, $this->collCustomers->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
              $this->doAddCustomer($l);
  
              if ($this->customersScheduledForDeletion and $this->customersScheduledForDeletion->contains($l)) {
                  $this->customersScheduledForDeletion->remove($this->customersScheduledForDeletion->search($l));
              }
          }
  
          return $this;
      }
code_tokens: public function addCustomer ( Customer $ l ) { if ( $ this -> collCustomers === null ) { $ this -> initCustomers ( ) ; $ this -> collCustomersPartial = true ; } if ( ! in_array ( $ l , $ this -> collCustomers -> getArrayCopy ( ) , true ) ) { // only add it if the **same** object is not already associated $ this -> doAddCustomer ( $ l ) ; if ( $ this -> customersScheduledForDeletion and $ this -> customersScheduledForDeletion -> contains ( $ l ) ) { $ this -> customersScheduledForDeletion -> remove ( $ this -> customersScheduledForDeletion -> search ( $ l ) ) ; } } return $ this ; }
docstring: Method called to associate a Customer object to this object
  through the Customer foreign key attribute.
  
  @param    Customer $l Customer
  @return Country The current object (for fluent API support)
docstring_tokens: Method called to associate a Customer object to this object through the Customer foreign key attribute .