From 5d11c2c2038793d4648f2c56637499eac2be0a3d Mon Sep 17 00:00:00 2001
From: Melissa Bent
Date: Tue, 20 Nov 2018 13:56:52 -0700
Subject: [PATCH] Issue #654: Copy assets to underscored directories
---
src/Report/Html/Facade.php | 6 +++---
src/Report/Html/Renderer/Directory.php | 4 ++--
.../Html/Renderer/Template/dashboard.html.dist | 14 +++++++-------
.../Html/Renderer/Template/directory.html.dist | 8 ++++----
src/Report/Html/Renderer/Template/file.html.dist | 16 ++++++++--------
5 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/Report/Html/Facade.php b/src/Report/Html/Facade.php
index 60441bca1..776bf5301 100644
--- a/src/Report/Html/Facade.php
+++ b/src/Report/Html/Facade.php
@@ -118,7 +118,7 @@ public function process(CodeCoverage $coverage, string $target): void
*/
private function copyFiles(string $target): void
{
- $dir = $this->getDirectory($target . '.css');
+ $dir = $this->getDirectory($target . '_css');
\copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css');
\copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css');
@@ -126,11 +126,11 @@ private function copyFiles(string $target): void
\copy($this->templatePath . 'css/custom.css', $dir . 'custom.css');
\copy($this->templatePath . 'css/octicons.css', $dir . 'octicons.css');
- $dir = $this->getDirectory($target . '.icons');
+ $dir = $this->getDirectory($target . '_icons');
\copy($this->templatePath . 'icons/file-code.svg', $dir . 'file-code.svg');
\copy($this->templatePath . 'icons/file-directory.svg', $dir . 'file-directory.svg');
- $dir = $this->getDirectory($target . '.js');
+ $dir = $this->getDirectory($target . '_js');
\copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js');
\copy($this->templatePath . 'js/popper.min.js', $dir . 'popper.min.js');
\copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js');
diff --git a/src/Report/Html/Renderer/Directory.php b/src/Report/Html/Renderer/Directory.php
index 711d15349..8fd068a04 100644
--- a/src/Report/Html/Renderer/Directory.php
+++ b/src/Report/Html/Renderer/Directory.php
@@ -76,7 +76,7 @@ protected function renderItem(Node $node, bool $total = false): string
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
- $data['icon'] = \sprintf('', $up);
+ $data['icon'] = \sprintf('', $up);
} else {
$data['name'] = \sprintf(
'%s',
@@ -86,7 +86,7 @@ protected function renderItem(Node $node, bool $total = false): string
$up = \str_repeat('../', \count($node->getPathAsArray()) - 2);
- $data['icon'] = \sprintf('', $up);
+ $data['icon'] = \sprintf('', $up);
}
}
diff --git a/src/Report/Html/Renderer/Template/dashboard.html.dist b/src/Report/Html/Renderer/Template/dashboard.html.dist
index cfa57687c..aa51bcb80 100644
--- a/src/Report/Html/Renderer/Template/dashboard.html.dist
+++ b/src/Report/Html/Renderer/Template/dashboard.html.dist
@@ -4,10 +4,10 @@
Dashboard for {{full_path}}
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
+