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