Пример #1
0
 /**
  * @inheritdoc
  */
 public function terminate(ResultCollection $collection, ResultCollection $groupedResults)
 {
     \Twig_Autoloader::register();
     $loader = new \Twig_Loader_Filesystem(__DIR__ . '/../../../../../templates/html');
     $twig = new \Twig_Environment($loader, array('cache' => false));
     $twig->addExtension(new FormatingExtension($this->validator));
     $bound = $this->bound->calculate($collection);
     return $twig->render('summary/report.html.twig', array('keys' => array_keys(current($collection->asArray())), 'results' => $collection->asArray(), 'groupedResults' => $groupedResults, 'root' => $groupedResults->getIterator()->current(), 'relations' => $this->prepareDataRelations($collection), 'scores' => $collection->getScore()->all(), 'ruleSet' => $this->validator->getRuleSet(), 'bounds' => $bound, 'withOOP' => null !== $bound->getSum('instability')));
 }