original_string: public function sku(array $values)
      {
          $count = count($values);
  
          $existing = array_filter($values, function ($sku) {
              $sku = $this->sku->get(array('sku' => $sku));
              return !empty($sku);
          });
  
          if ($count != count($existing)) {
              return $this->translation->text('@name is unavailable', array(
                  '@name' => $this->translation->text('SKU')));
          }
  
          return true;
      }
code: public function sku(array $values)
      {
          $count = count($values);
  
          $existing = array_filter($values, function ($sku) {
              $sku = $this->sku->get(array('sku' => $sku));
              return !empty($sku);
          });
  
          if ($count != count($existing)) {
              return $this->translation->text('@name is unavailable', array(
                  '@name' => $this->translation->text('SKU')));
          }
  
          return true;
      }
code_tokens: public function sku ( array $ values ) { $ count = count ( $ values ) ; $ existing = array_filter ( $ values , function ( $ sku ) { $ sku = $ this -> sku -> get ( array ( 'sku' => $ sku ) ) ; return ! empty ( $ sku ) ; } ) ; if ( $ count != count ( $ existing ) ) { return $ this -> translation -> text ( '@name is unavailable' , array ( '@name' => $ this -> translation -> text ( 'SKU' ) ) ) ; } return true ; }
docstring: Validates the SKU condition
  @param array $values
  @return boolean|string
docstring_tokens: Validates the SKU condition