private function replaceValue(Comparison $comparison) { $value = $comparison->getValue(); $isArray = is_array($value); $values = (array) $value; foreach ($values as &$value) { $value = $this->uuidResolver->resolve($value); } if (false === $isArray) { $comparison->replaceValue(reset($values)); return; } $comparison->replaceValue($values); }
private function getSuite(\ArrayObject $context, array $row) { $key = $row['run.uuid']; if (isset($context[self::SUITES][$key])) { return $context[self::SUITES][$key]; } $suite = new Suite($row['run.context'], new \DateTime($row['run.date']), null, [], [], $row['run.uuid']); $context[self::SUITES][$key] = $suite; $envRows = $this->repository->getRunEnvInformationRows($row['run.id']); $providerData = []; foreach ($envRows as $row) { if (!isset($providerData[$row['provider']])) { $providerData[$row['provider']] = []; } $providerData[$row['provider']][$row['ekey']] = $row['value']; } $informations = []; foreach ($providerData as $name => $data) { $informations[] = new Information($name, $data); } $suite->setEnvInformations($informations); return $suite; }