original_string: public function isGroupCenterPresentOnce(ExecutionContextInterface $context)
      {
          $groupCentersIds = array();
          foreach ($this->getGroupCenters() as $groupCenter) {
              if (in_array($groupCenter->getId(), $groupCentersIds)) {
                  $context->buildViolation("The user has already those permissions")
                          ->addViolation();
                  
              } else {
                  $groupCentersIds[] = $groupCenter->getId();
              }
          }
      }
code: public function isGroupCenterPresentOnce(ExecutionContextInterface $context)
      {
          $groupCentersIds = array();
          foreach ($this->getGroupCenters() as $groupCenter) {
              if (in_array($groupCenter->getId(), $groupCentersIds)) {
                  $context->buildViolation("The user has already those permissions")
                          ->addViolation();
                  
              } else {
                  $groupCentersIds[] = $groupCenter->getId();
              }
          }
      }
code_tokens: public function isGroupCenterPresentOnce ( ExecutionContextInterface $ context ) { $ groupCentersIds = array ( ) ; foreach ( $ this -> getGroupCenters ( ) as $ groupCenter ) { if ( in_array ( $ groupCenter -> getId ( ) , $ groupCentersIds ) ) { $ context -> buildViolation ( "The user has already those permissions" ) -> addViolation ( ) ; } else { $ groupCentersIds [ ] = $ groupCenter -> getId ( ) ; } } }
docstring: This function check that groupCenter are present only once. The validator
  use this function to avoid a user to be associated to the same groupCenter
  more than once.
docstring_tokens: This function check that groupCenter are present only once . The validator use this function to avoid a user to be associated to the same groupCenter more than once .