original_string: public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory)
      {
          if ($this->getMetricId() && $this->dbTableName && $this->columnName && $this->getNamePlural()) {
              if (in_array($this->getType(), array(self::TYPE_DATETIME, self::TYPE_DATE, self::TYPE_TIME, self::TYPE_TIMESTAMP))) {
                  // we do not generate any metrics from these types
                  return;
              } elseif (in_array($this->getType(), array(self::TYPE_URL, self::TYPE_TEXT, self::TYPE_BINARY, self::TYPE_ENUM))) {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_UNIQUE);
                  $metricsList->addMetric($metric);
              } elseif (in_array($this->getType(), array(self::TYPE_BOOL))) {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_SUM);
                  $metricsList->addMetric($metric);
              } else {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_SUM);
                  $metricsList->addMetric($metric);
  
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_MAX);
                  $metricsList->addMetric($metric);
              }
          }
      }
code: public function configureMetrics(MetricsList $metricsList, DimensionMetricFactory $dimensionMetricFactory)
      {
          if ($this->getMetricId() && $this->dbTableName && $this->columnName && $this->getNamePlural()) {
              if (in_array($this->getType(), array(self::TYPE_DATETIME, self::TYPE_DATE, self::TYPE_TIME, self::TYPE_TIMESTAMP))) {
                  // we do not generate any metrics from these types
                  return;
              } elseif (in_array($this->getType(), array(self::TYPE_URL, self::TYPE_TEXT, self::TYPE_BINARY, self::TYPE_ENUM))) {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_UNIQUE);
                  $metricsList->addMetric($metric);
              } elseif (in_array($this->getType(), array(self::TYPE_BOOL))) {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_SUM);
                  $metricsList->addMetric($metric);
              } else {
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_SUM);
                  $metricsList->addMetric($metric);
  
                  $metric = $dimensionMetricFactory->createMetric(ArchivedMetric::AGGREGATION_MAX);
                  $metricsList->addMetric($metric);
              }
          }
      }
code_tokens: public function configureMetrics ( MetricsList $ metricsList , DimensionMetricFactory $ dimensionMetricFactory ) { if ( $ this -> getMetricId ( ) && $ this -> dbTableName && $ this -> columnName && $ this -> getNamePlural ( ) ) { if ( in_array ( $ this -> getType ( ) , array ( self :: TYPE_DATETIME , self :: TYPE_DATE , self :: TYPE_TIME , self :: TYPE_TIMESTAMP ) ) ) { // we do not generate any metrics from these types return ; } elseif ( in_array ( $ this -> getType ( ) , array ( self :: TYPE_URL , self :: TYPE_TEXT , self :: TYPE_BINARY , self :: TYPE_ENUM ) ) ) { $ metric = $ dimensionMetricFactory -> createMetric ( ArchivedMetric :: AGGREGATION_UNIQUE ) ; $ metricsList -> addMetric ( $ metric ) ; } elseif ( in_array ( $ this -> getType ( ) , array ( self :: TYPE_BOOL ) ) ) { $ metric = $ dimensionMetricFactory -> createMetric ( ArchivedMetric :: AGGREGATION_SUM ) ; $ metricsList -> addMetric ( $ metric ) ; } else { $ metric = $ dimensionMetricFactory -> createMetric ( ArchivedMetric :: AGGREGATION_SUM ) ; $ metricsList -> addMetric ( $ metric ) ; $ metric = $ dimensionMetricFactory -> createMetric ( ArchivedMetric :: AGGREGATION_MAX ) ; $ metricsList -> addMetric ( $ metric ) ; } } }
docstring: Configures metrics for this dimension.
  
  For certain dimension types, some metrics will be added automatically.
  
  @param MetricsList $metricsList
  @param DimensionMetricFactory $dimensionMetricFactory
docstring_tokens: Configures metrics for this dimension .