public function normalize(NormalizerInterface $normalizer, $format = null, array $context = array())
{
$result = array('name' => $this->name, 'path' => $this->path);
if (isset($context['project_details']) && $context['project_details']) {
$result['properties'] = $normalizer->normalize($this->properties, $format, $context);
$result['features'] = $normalizer->normalize($this->getFeatures(), $format, $context);
}
if (isset($context['project_runs']) && $context['project_runs']) {
$maxRuns = isset($context['max_runs']) ? $context['max_runs'] : 5;
$runs = $context['run_storage']->getRuns($this, 0, $maxRuns);
$result['runs'] = $normalizer->normalize($runs, $format, $context);
}
return $result;
}