original_string: public function route(array $values, $operator)
      {
          if (!in_array($operator, array('=', '!='))) {
              return $this->translation->text('Unsupported operator');
          }
  
          $existing = $this->route->getList();
  
          foreach ($values as $pattern) {
              if (empty($existing[$pattern])) {
                  return $this->translation->text('@name is unavailable', array(
                      '@name' => $this->translation->text('Condition')));
              }
          }
  
          return true;
      }
code: public function route(array $values, $operator)
      {
          if (!in_array($operator, array('=', '!='))) {
              return $this->translation->text('Unsupported operator');
          }
  
          $existing = $this->route->getList();
  
          foreach ($values as $pattern) {
              if (empty($existing[$pattern])) {
                  return $this->translation->text('@name is unavailable', array(
                      '@name' => $this->translation->text('Condition')));
              }
          }
  
          return true;
      }
code_tokens: public function route ( array $ values , $ operator ) { if ( ! in_array ( $ operator , array ( '=' , '!=' ) ) ) { return $ this -> translation -> text ( 'Unsupported operator' ) ; } $ existing = $ this -> route -> getList ( ) ; foreach ( $ values as $ pattern ) { if ( empty ( $ existing [ $ pattern ] ) ) { return $ this -> translation -> text ( '@name is unavailable' , array ( '@name' => $ this -> translation -> text ( 'Condition' ) ) ) ; } } return true ; }
docstring: Validates the route pattern
  @param array $values
  @param string $operator
  @return boolean|string
docstring_tokens: Validates the route pattern