Hydrate a collection of concat objects into a collection of
ComparisonEntity objects

@param stdClass[] $comparisons
@return ComparisonEntity[]
963146
public static function hydrateCollection(array $comparisons)
    {
        $hydrated = [];

        foreach ($comparisons as $comparison) {
            $hydrated[] = self::hydrate($comparison);
        }

        return $hydrated;
    }
115851
public static function hydrateCollection(array $processes)
    {
        $hydrated = [];

        foreach ($processes as $process) {
            $hydrated[] = self::hydrate($process);
        }

        return $hydrated;
    }
68473
public function common(DatePeriodDateTime $comparison) : ?self
    {
        $start = $this;
        $end = $this->getEndDate();

        $comparisonStart = $comparison;
        $comparisonEnd = $comparison->getEndDate();

        /*
         *            L     H
         * C :        |_____|
         * 1 :      __|__   |
         * 2 :     ___|     |
         * 3 :        |   __|___
         * 4 :        |     |___
         * 5 :      __|_____|__
         * 6 :        |_____|___
         * 7 :      __|_____|
         * 8 :        |_____|
         * 9 :   __   |     |
         * 10:        |     | __
         * 11:        |  __ |
         */

        // case 1
        if ($start->lt($comparisonStart) && $comparisonStart->gt($start) && $end->lt($comparisonEnd) && $end->gt($comparisonStart)) {
            return new static($comparisonStart, $end);
        }

        // case 2
        if ($end->eq($comparisonStart)) {
            return null;
        }

        // case 3
        if ($start->gt($comparisonStart) && $start->lt($comparisonEnd) && $end->gt($comparisonEnd)) {
            return new static($start, $comparisonEnd);
        }

        // case 4
        if ($start->eq($comparisonEnd)) {
            return null;
        }

        // case 5
        if ($start->lt($comparisonStart) && $end->gt($comparisonEnd)) {
            return new static($comparisonStart, $comparisonEnd);
        }

        // case 6
        if ($start->eq($comparisonStart) && $end->gt($comparisonEnd)) {
            return new static($comparisonStart, $comparisonEnd);
        }

        // case 7
        if ($start->lt($comparisonStart) && $end->eq($comparisonEnd)) {
            return new static($comparisonStart, $comparisonEnd);
        }

        // case 8
        if ($start->eq($comparisonStart) && $end->eq($comparisonEnd)) {
            return new static($comparisonStart, $comparisonEnd);
        }

        // case 9
        if ($end->lte($comparisonStart)) {
            return null;
        }

        // case 10
        if ($start->gte($comparisonEnd)) {
            return null;
        }

        // case 11
        if ($start->gt($comparisonStart) && $end->lt($comparisonEnd)) {
            return new static($start, $end);
        }

        return null;
    }
444011
public static function reorderExclusions($exclusions) {
    $new_exclusions = [];
    foreach ($exclusions as $exclusion) {
      $from = strtotime($exclusion['from']);
      $new_exclusions[$from] = $exclusion;
    }
    sort($new_exclusions);

    return $new_exclusions;
  }
31327
public static function hydrateCollection(array $callbacks)
    {
        $hydrated = [];

        foreach ($callbacks as $callback) {
            $hydrated[] = self::hydrate($callback);
        }

        return $hydrated;
    }
535518
public function requestComparisonStrategy(): ComparisonStrategy {
		if ($this->comparisonStrategy !== null) {
			return $this->comparisonStrategy;
		}
		
		$selectedQueryPoints = array_merge($this->queryModel->getNamedSelectQueryPoints(),
				$this->queryModel->getUnnamedSelectQueryPoints());
		if (1 != count($selectedQueryPoints)) {
			throw new CriteriaConflictException('Subselect not comparable.');
		}
		
		$comparisonStrategy = current($selectedQueryPoints)->requestComparisonStrategy();
		CastUtils::assertTrue($comparisonStrategy instanceof ComparisonStrategy);
		if ($comparisonStrategy->getType() != ComparisonStrategy::TYPE_COLUMN) {
			throw new CriteriaConflictException();
		}
		
		$columnComparable = $comparisonStrategy->getColumnComparable();
		
		$this->queryModel->getQueryItemSelect()->selectQueryItem($columnComparable
				->buildQueryItem(CriteriaComparator::OPERATOR_EQUAL));
		
		$selectBuilder  = $this->queryState->getPdo()->getMetaData()->createSelectStatementBuilder();
		$this->queryModel->apply($selectBuilder);
				
		return $this->comparisonStrategy = new ComparisonStrategy(new CriteriaColumnComparable(
				$selectBuilder->toQueryResult(), $columnComparable));
	}
1228591
public function walkComparison(Comparison $comparison)
    {
        $field    = $comparison->getField();
        $value    = $comparison->getValue()->getValue(); // shortcut for walkValue()
        $property = $this->classMetadata->getProperty($field);

        if ($property instanceof AssociationMetadata &&
            $value !== null &&
            ! is_object($value) &&
            ! in_array($comparison->getOperator(), [Comparison::IN, Comparison::NIN], true)) {
            throw MatchingAssociationFieldRequiresObject::fromClassAndAssociation(
                $this->classMetadata->getClassName(),
                $field
            );
        }

        return $this->persister->getSelectConditionStatementSQL($field, $value, null, $comparison->getOperator());
    }
30583
public function comparisons()
    {
        if (is_null($this->comparisonRequests)) {
            $this->comparisonRequests = new ComparisonRequests($this->client);
        }

        return $this->comparisonRequests;
    }
1075510
public static function hydrateCollection(array $censuses)
    {
        $hydrated = [];

        foreach ($censuses as $census) {
            $hydrated[] = self::hydrate($census);
        }

        return $hydrated;
    }
1232386
public function sorted(callable $compare): self
    {
        $intervals = $this->intervals;
        usort($intervals, $compare);
        if ($intervals === $this->intervals) {
            return $this;
        }

        return new self(...$intervals);
    }
717111
public function intersect(ArrayBase $comparedata)
    {
        $cmpvalue = function($v1, $v2) { return $v1==$v2 ? 0 : ($v1>$v2 ? 1 : -1); };
        $collection = $this->newInstance();

        $temp = array_uintersect($this->getData(), $comparedata->getData(), $cmpvalue);

        $collection->setData($temp);
        unset($temp);
        return $collection;
    }
933493
public function getComparisons()
    {
        $comparisons = array();

        foreach ($this->set->group->compareWith as $name) {
            $benchmark = $this->set->benchmarks[$name];
            $comparisons[$name] = new Comparison(
                $this->getAverage(), $benchmark->getAverage()
            );
        }

        return $comparisons;
    }
1135320
public static function hydrateCollection(array $extensions)
    {
        $hydrated = [];

        foreach ($extensions as $extension) {
            $hydrated[] = self::hydrate($extension);
        }

        return $hydrated;
    }
1053294
public static function hydrateCollection(array $summaries)
    {
        $hydrated = [];

        foreach ($summaries as $summary) {
            $hydrated[] = self::hydrate($summary);
        }

        return $hydrated;
    }
579575
public function merge(array $values)
    {
        $storage = $this->getArrayCopy();
        $storage = array_merge($storage, $values);

        $this->exchangeArray($storage);

        return $storage;
    }
1321047
public function intersection($values) : Collection
    {
        if (!is_array($values)) {
            $values = iterator_to_array($values);
        }
        $keys = array_keys($values);
        $isAssoc = $keys !== array_keys($keys);
        return $this->filter(function ($v, $k) use ($values, $isAssoc) {
            return $isAssoc ? 
                array_search($v, $values) === $k :
                in_array($v, $values, true);
        });
    }
1357947
public static function hydrateCollection(array $settings)
    {
        $hydrated = [];

        foreach ($settings as $setting) {
            $hydrated[] = self::hydrate($setting);
        }

        return $hydrated;
    }