Hydrate a collection of review objects into a collection of
ReviewEntity objects

@param stdClass[] $reviews
@return ReviewEntity[]
420229
public static function hydrateCollection(array $reviews)
    {
        $hydrated = [];

        foreach ($reviews as $review) {
            $hydrated[] = self::hydrate($review);
        }

        return $hydrated;
    }
398561
public function add(string $reviewer, array $params = [])
    {
        $path = $this->buildDefaultReviewersPath($reviewer);

        return $this->put($path, $params);
    }
422156
protected function hydrateModelsAndLoadIncludes($results)
	{
		$hydrated = [];

		foreach($results as $result)
		{
			$hydrated[] = $this->hydrateModel($result);
		}

		$this->loadIncludes($hydrated);

		return $hydrated;
	}
1276423
public static function hydrate(stdClass $comparison)
    {
        $hydrated = new ComparisonEntity();

        if (isset($comparison->id)) {
            $hydrated->setId($comparison->id);
        }

        if (isset($comparison->allowedMisses)) {
            $hydrated->setAllowedMisses($comparison->allowedMisses);
        }

        if (isset($comparison->filesThreshold)) {
            $hydrated->setFilesThreshold($comparison->filesThreshold);
        }

        if (isset($comparison->scannedOldFiles)) {
            $hydrated->setScannedOldFiles($comparison->scannedOldFiles);
        }

        if (isset($comparison->scannedNewFiles)) {
            $hydrated->setScannedNewFiles($comparison->scannedNewFiles);
        }

        if (isset($comparison->skippedOldFiles)) {
            $hydrated->setSkippedOldFiles($comparison->skippedOldFiles);
        }

        if (isset($comparison->skippedNewFiles)) {
            $hydrated->setSkippedNewFiles($comparison->skippedNewFiles);
        }

        if (isset($comparison->misses)) {
            $hydrated->setMisses($comparison->misses);
        }

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

        foreach ($acls as $acl) {
            $hydrated[] = self::hydrate($acl);
        }

        return $hydrated;
    }
541656
public function remove(string $reviewer, array $params = [])
    {
        $path = $this->buildDefaultReviewersPath($reviewer);

        return $this->delete($path, $params);
    }
1202067
public static function hydrateCollection(array $phps)
    {
        $hydrated = [];

        foreach ($phps as $php) {
            $hydrated[] = self::hydrate($php);
        }

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

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

        return $hydrated;
    }
692543
private function getRatingWithoutReviewData(ArrayCollection $reviews, ArrayCollection $ratings)
    {
        $ratingList = [];

        foreach ($ratings as $rating) {
            if ($this->isRatingWithoutReview($rating, $reviews)) {
                $ratingList[] = [
                    'ratingId'      => $rating->getId(),
                    'reviewId'      => false,
                    'rating'        => $rating->getRating(),
                    'text'          => '',
                    'objectId'      => $rating->getObjectId(),
                    'objectType'    => $rating->getType(),
                    'createdAt'     => $rating->getCreatedAt(),
                ];
            }
        }

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

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

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

        foreach ($teams as $team) {
            $hydrated[] = self::hydrate($team);
        }

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

        foreach ($controllers as $controller) {
            $hydrated[] = self::hydrate($controller);
        }

        return $hydrated;
    }
63130
public function hydrate(array $items)
    {
        if (!$instance = $this->newModelInstance()) {
            return $items;
        }

        $models = array_map(function ($item) use ($instance) {
            return $instance->newFromBuilder($item);
        }, $items);

        if (!empty($this->with)) {
            $instance
                ->newQuery()
                ->setEagerLoads($this->eagerLoads())
                ->eagerLoadRelations($models);
        }

        return $models;
    }
664225
public static function hydrateCollection(array $validators)
    {
        $hydrated = [];

        foreach ($validators as $validator) {
            $hydrated[] = self::hydrate($validator);
        }

        return $hydrated;
    }
1239208
public static function createFromObjects(array $objects = null)
    {
        if ($objects === null) {
            return null;
        }

        $collection = new static();

        foreach ($objects as $v) {
            if (!($v instanceof Contact) && ($v instanceof stdClass)) {
                $part = new Contact();
                $part->updateFromObject($v);
            }

            $collection->add($v);
        }

        return $collection;
    }
286690
public static function hydrate(array $items, $connection = null)
    {
        $collection = with($instance = new static)->newCollection();

        foreach ($items as $item) {
            $model = $instance->newFromBuilder($item);

            if (! is_null($connection)) {
                $model->setConnection($connection);
            }

            $collection->push($model);
        }

        return $collection;
    }
91047
public static function hydrateCollection(array $queues)
    {
        $hydrated = [];

        foreach ($queues as $queue) {
            $hydrated[] = self::hydrate($queue);
        }

        return $hydrated;
    }