Esempio n. 1
0
 protected function generateResultHtml($extension)
 {
     HamlLoader::register();
     $haml = new HamlGenerator('php', array('enable_escaper' => false));
     $template = 'Resources/views/result.haml';
     $targetFile = 'tmp/result.php';
     $compiled = $haml->compileString(file_get_contents($template), $template);
     file_put_contents($targetFile, $compiled);
     //        $results = $this->convertResultCommentsToHtml(
     //            Logger::getResultArray($extension)
     //        );
     //        $results = $this->convertResultCommentsToHtml(Logger::getIssueResults($extension));
     $passedChecks = Logger::getPassedChecksOfIssueHandler($extension);
     $failedChecks = Logger::getFailedChecksOfIssueHandler($extension);
     //        $failedChecks = $results['failedChecks'];
     //        $score        = $results['score'];
     ob_start();
     include $targetFile;
     $result = ob_get_contents();
     ob_end_clean();
     $targetHtml = 'tmp/result.html';
     file_put_contents($targetHtml, $result);
 }