original_string: public function addPropertyConstraint($property, Constraint $constraint)
      {
          if (!isset($this->properties[$property])) {
              $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property);
  
              $this->addPropertyMetadata($this->properties[$property]);
          }
  
          $constraint->addImplicitGroupName($this->getDefaultGroup());
  
          $this->properties[$property]->addConstraint($constraint);
  
          return $this;
      }
code: public function addPropertyConstraint($property, Constraint $constraint)
      {
          if (!isset($this->properties[$property])) {
              $this->properties[$property] = new PropertyMetadata($this->getClassName(), $property);
  
              $this->addPropertyMetadata($this->properties[$property]);
          }
  
          $constraint->addImplicitGroupName($this->getDefaultGroup());
  
          $this->properties[$property]->addConstraint($constraint);
  
          return $this;
      }
code_tokens: public function addPropertyConstraint ( $ property , Constraint $ constraint ) { if ( ! isset ( $ this -> properties [ $ property ] ) ) { $ this -> properties [ $ property ] = new PropertyMetadata ( $ this -> getClassName ( ) , $ property ) ; $ this -> addPropertyMetadata ( $ this -> properties [ $ property ] ) ; } $ constraint -> addImplicitGroupName ( $ this -> getDefaultGroup ( ) ) ; $ this -> properties [ $ property ] -> addConstraint ( $ constraint ) ; return $ this ; }
docstring: Adds a constraint to the given property.
  
  @param string     $property   The name of the property
  @param Constraint $constraint The constraint
  
  @return $this
docstring_tokens: Adds a constraint to the given property .