|
8 | 8 |
|
9 | 9 | class Reporter
|
10 | 10 | {
|
11 |
| - |
12 | 11 | /**
|
13 | 12 | * @var Config
|
14 | 13 | */
|
@@ -66,27 +65,27 @@ public function generate(Metrics $metrics)
|
66 | 65 | if (!file_exists($logDir . '/fonts')) {
|
67 | 66 | mkdir($logDir . '/fonts', 0755, true);
|
68 | 67 | }
|
69 |
| - recurse_copy(__DIR__ . '/template/js', $logDir . '/js'); |
70 |
| - recurse_copy(__DIR__ . '/template/css', $logDir . '/css'); |
71 |
| - recurse_copy(__DIR__ . '/template/images', $logDir . '/images'); |
72 |
| - recurse_copy(__DIR__ . '/template/fonts', $logDir . '/fonts'); |
| 68 | + recurse_copy(PROJECT_DIR . '/templates/html_report/js', $logDir . '/js'); |
| 69 | + recurse_copy(PROJECT_DIR . '/templates/html_report/css', $logDir . '/css'); |
| 70 | + recurse_copy(PROJECT_DIR . '/templates/html_report/images', $logDir . '/images'); |
| 71 | + recurse_copy(PROJECT_DIR . '/templates/html_report/fonts', $logDir . '/fonts'); |
73 | 72 |
|
74 | 73 | // render dynamic pages
|
75 |
| - $this->renderPage(__DIR__ . '/template/index.php', $logDir . '/index.html', $consolidated, $history); |
76 |
| - $this->renderPage(__DIR__ . '/template/loc.php', $logDir . '/loc.html', $consolidated, $history); |
77 |
| - $this->renderPage(__DIR__ . '/template/relations.php', $logDir . '/relations.html', $consolidated, $history); |
78 |
| - $this->renderPage(__DIR__ . '/template/coupling.php', $logDir . '/coupling.html', $consolidated, $history); |
79 |
| - $this->renderPage(__DIR__ . '/template/all.php', $logDir . '/all.html', $consolidated, $history); |
80 |
| - $this->renderPage(__DIR__ . '/template/oop.php', $logDir . '/oop.html', $consolidated, $history); |
81 |
| - $this->renderPage(__DIR__ . '/template/complexity.php', $logDir . '/complexity.html', $consolidated, $history); |
82 |
| - $this->renderPage(__DIR__ . '/template/panel.php', $logDir . '/panel.html', $consolidated, $history); |
83 |
| - $this->renderPage(__DIR__ . '/template/violations.php', $logDir . '/violations.html', $consolidated, $history); |
84 |
| - $this->renderPage(__DIR__ . '/template/packages.php', $logDir . '/packages.html', $consolidated, $history); |
85 |
| - $this->renderPage(__DIR__ . '/template/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history); |
| 74 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/index.php', $logDir . '/index.html', $consolidated, $history); |
| 75 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/loc.php', $logDir . '/loc.html', $consolidated, $history); |
| 76 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/relations.php', $logDir . '/relations.html', $consolidated, $history); |
| 77 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/coupling.php', $logDir . '/coupling.html', $consolidated, $history); |
| 78 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/all.php', $logDir . '/all.html', $consolidated, $history); |
| 79 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/oop.php', $logDir . '/oop.html', $consolidated, $history); |
| 80 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/complexity.php', $logDir . '/complexity.html', $consolidated, $history); |
| 81 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/panel.php', $logDir . '/panel.html', $consolidated, $history); |
| 82 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/violations.php', $logDir . '/violations.html', $consolidated, $history); |
| 83 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/packages.php', $logDir . '/packages.html', $consolidated, $history); |
| 84 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/package_relations.php', $logDir . '/package_relations.html', $consolidated, $history); |
86 | 85 | if ($this->config->has('git')) {
|
87 |
| - $this->renderPage(__DIR__ . '/template/git.php', $logDir . '/git.html', $consolidated, $history); |
| 86 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/git.php', $logDir . '/git.html', $consolidated, $history); |
88 | 87 | }
|
89 |
| - $this->renderPage(__DIR__ . '/template/junit.php', $logDir . '/junit.html', $consolidated, $history); |
| 88 | + $this->renderPage(PROJECT_DIR . '/templates/html_report/junit.php', $logDir . '/junit.html', $consolidated, $history); |
90 | 89 |
|
91 | 90 | // js data
|
92 | 91 | file_put_contents(
|
|
0 commit comments