original_string: public function mergeConstraints(self $source)
      {
          if ($source->isGroupSequenceProvider()) {
              $this->setGroupSequenceProvider(true);
          }
  
          foreach ($source->getConstraints() as $constraint) {
              $this->addConstraint(clone $constraint);
          }
  
          foreach ($source->getConstrainedProperties() as $property) {
              foreach ($source->getPropertyMetadata($property) as $member) {
                  $member = clone $member;
  
                  foreach ($member->getConstraints() as $constraint) {
                      if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) {
                          $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint;
                      }
  
                      $constraint->addImplicitGroupName($this->getDefaultGroup());
                  }
  
                  $this->addPropertyMetadata($member);
  
                  if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) {
                      $property = $member->getPropertyName();
  
                      if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) {
                          $this->properties[$property] = $member;
                      } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) {
                          $this->getters[$property] = $member;
                      }
                  }
              }
          }
      }
code: public function mergeConstraints(self $source)
      {
          if ($source->isGroupSequenceProvider()) {
              $this->setGroupSequenceProvider(true);
          }
  
          foreach ($source->getConstraints() as $constraint) {
              $this->addConstraint(clone $constraint);
          }
  
          foreach ($source->getConstrainedProperties() as $property) {
              foreach ($source->getPropertyMetadata($property) as $member) {
                  $member = clone $member;
  
                  foreach ($member->getConstraints() as $constraint) {
                      if (\in_array($constraint::DEFAULT_GROUP, $constraint->groups, true)) {
                          $member->constraintsByGroup[$this->getDefaultGroup()][] = $constraint;
                      }
  
                      $constraint->addImplicitGroupName($this->getDefaultGroup());
                  }
  
                  $this->addPropertyMetadata($member);
  
                  if ($member instanceof MemberMetadata && !$member->isPrivate($this->name)) {
                      $property = $member->getPropertyName();
  
                      if ($member instanceof PropertyMetadata && !isset($this->properties[$property])) {
                          $this->properties[$property] = $member;
                      } elseif ($member instanceof GetterMetadata && !isset($this->getters[$property])) {
                          $this->getters[$property] = $member;
                      }
                  }
              }
          }
      }
code_tokens: public function mergeConstraints ( self $ source ) { if ( $ source -> isGroupSequenceProvider ( ) ) { $ this -> setGroupSequenceProvider ( true ) ; } foreach ( $ source -> getConstraints ( ) as $ constraint ) { $ this -> addConstraint ( clone $ constraint ) ; } foreach ( $ source -> getConstrainedProperties ( ) as $ property ) { foreach ( $ source -> getPropertyMetadata ( $ property ) as $ member ) { $ member = clone $ member ; foreach ( $ member -> getConstraints ( ) as $ constraint ) { if ( \ in_array ( $ constraint :: DEFAULT_GROUP , $ constraint -> groups , true ) ) { $ member -> constraintsByGroup [ $ this -> getDefaultGroup ( ) ] [ ] = $ constraint ; } $ constraint -> addImplicitGroupName ( $ this -> getDefaultGroup ( ) ) ; } $ this -> addPropertyMetadata ( $ member ) ; if ( $ member instanceof MemberMetadata && ! $ member -> isPrivate ( $ this -> name ) ) { $ property = $ member -> getPropertyName ( ) ; if ( $ member instanceof PropertyMetadata && ! isset ( $ this -> properties [ $ property ] ) ) { $ this -> properties [ $ property ] = $ member ; } elseif ( $ member instanceof GetterMetadata && ! isset ( $ this -> getters [ $ property ] ) ) { $ this -> getters [ $ property ] = $ member ; } } } } }
docstring: Merges the constraints of the given metadata into this object.
docstring_tokens: Merges the constraints of the given metadata into this object .