original_string: public function findUserIdsWithOnlyOneGroup()
      {
          $query = $this->find();
          return $query
              ->select([
                  'user_id',
                  'group_count' => $query->func()->count('*')
              ])
              ->group('user_id')
              ->having([
                  'group_count = 1'
              ])
              ->extract('user_id')
              ->toArray();
      }
code: public function findUserIdsWithOnlyOneGroup()
      {
          $query = $this->find();
          return $query
              ->select([
                  'user_id',
                  'group_count' => $query->func()->count('*')
              ])
              ->group('user_id')
              ->having([
                  'group_count = 1'
              ])
              ->extract('user_id')
              ->toArray();
      }
code_tokens: public function findUserIdsWithOnlyOneGroup ( ) { $ query = $ this -> find ( ) ; return $ query -> select ( [ 'user_id' , 'group_count' => $ query -> func ( ) -> count ( '*' ) ] ) -> group ( 'user_id' ) -> having ( [ 'group_count = 1' ] ) -> extract ( 'user_id' ) -> toArray ( ) ; }
docstring: Find all user ids of users assigned to only one group.
  
  @return array
docstring_tokens: Find all user ids of users assigned to only one group .