Skip to content

Commit fd8406c

Browse files
author
Matheus Alves Barbosa
committed
fix template path
1 parent 927ee57 commit fd8406c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/HtmlOutputFormatter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function createErrorsData(array $errors): array
112112

113113
public static function getGeneratedHTML(array $errorsJson): string
114114
{
115-
$template = 'report-template.php';
115+
$template = __DIR__ . '/report-template.php';
116116

117117
return self::render($template, [
118118
'errorsJson' => $errorsJson,
@@ -144,9 +144,9 @@ public static function render($file, $params)
144144
$content = ob_get_contents();
145145
ob_end_clean();
146146
} else {
147-
throw new RuntimeException(sprintf('Cant find view file %s!', $file));
147+
throw new \RuntimeException(sprintf('Cant find view file %s!', $file));
148148
}
149149

150150
return $content;
151151
}
152-
}
152+
}

0 commit comments

Comments
 (0)