original_string: public function getUnique($sku, $store_id)
      {
          $existing = $this->get(array('sku' => $sku, 'store_id' => $store_id));
  
          if (empty($existing)) {
              return $sku;
          }
  
          $counter = 1;
  
          do {
              $modified = $sku . '-' . $counter;
              $counter++;
          } while ($this->get(array('sku' => $modified, 'store_id' => $store_id)));
  
          return $modified;
      }
code: public function getUnique($sku, $store_id)
      {
          $existing = $this->get(array('sku' => $sku, 'store_id' => $store_id));
  
          if (empty($existing)) {
              return $sku;
          }
  
          $counter = 1;
  
          do {
              $modified = $sku . '-' . $counter;
              $counter++;
          } while ($this->get(array('sku' => $modified, 'store_id' => $store_id)));
  
          return $modified;
      }
code_tokens: public function getUnique ( $ sku , $ store_id ) { $ existing = $ this -> get ( array ( 'sku' => $ sku , 'store_id' => $ store_id ) ) ; if ( empty ( $ existing ) ) { return $ sku ; } $ counter = 1 ; do { $ modified = $ sku . '-' . $ counter ; $ counter ++ ; } while ( $ this -> get ( array ( 'sku' => $ modified , 'store_id' => $ store_id ) ) ) ; return $ modified ; }
docstring: Returns a unique SKU for the given store ID
  @param string $sku
  @param integer|null $store_id
  @return string
docstring_tokens: Returns a unique SKU for the given store ID