original_string: public function isProfileAssignedToAnotherUser($curentUserId, $identifier, $provider)
      {
          $qb = $this->createQueryBuilder(null);
          $qb->field('_id')->notEqual($curentUserId)
              ->addAnd(
                  $qb->expr()
                      ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier))
                      ->addOr($qb->expr()->field('profile.identifier')->equals($identifier))
              );
          
          return $qb->count()
              ->getQuery()
              ->execute() > 0;
      }
code: public function isProfileAssignedToAnotherUser($curentUserId, $identifier, $provider)
      {
          $qb = $this->createQueryBuilder(null);
          $qb->field('_id')->notEqual($curentUserId)
              ->addAnd(
                  $qb->expr()
                      ->addOr($qb->expr()->field('profiles.' . $provider . '.auth.identifier' )->equals($identifier))
                      ->addOr($qb->expr()->field('profile.identifier')->equals($identifier))
              );
          
          return $qb->count()
              ->getQuery()
              ->execute() > 0;
      }
code_tokens: public function isProfileAssignedToAnotherUser ( $ curentUserId , $ identifier , $ provider ) { $ qb = $ this -> createQueryBuilder ( null ) ; $ qb -> field ( '_id' ) -> notEqual ( $ curentUserId ) -> addAnd ( $ qb -> expr ( ) -> addOr ( $ qb -> expr ( ) -> field ( 'profiles.' . $ provider . '.auth.identifier' ) -> equals ( $ identifier ) ) -> addOr ( $ qb -> expr ( ) -> field ( 'profile.identifier' ) -> equals ( $ identifier ) ) ) ; return $ qb -> count ( ) -> getQuery ( ) -> execute ( ) > 0 ; }
docstring: Returns true if profile is already assigned to anotherUser
  
  @param int $curentUserId
  @param string $identifier
  @param string $provider
  @return bool
docstring_tokens: Returns true if profile is already assigned to anotherUser