diff --git a/.travis.yml b/.travis.yml index b9cf2563..2524ec67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,7 @@ jobs: allow_failures: - stage: Static Analysis (informative) - stage: Code Coverage + - php: nightly dist: xenial diff --git a/src/CodeCoverage/Generators/template.phtml b/src/CodeCoverage/Generators/template.phtml index 4db2a3e3..0fb4e126 100644 --- a/src/CodeCoverage/Generators/template.phtml +++ b/src/CodeCoverage/Generators/template.phtml @@ -10,12 +10,12 @@
-' => "",
+ '' => '',
+ '
' => '
',
+ ]);
+ $jsonData[$currentId] = $data;
+} ?>
+
+
+ = $title ? htmlspecialchars("$title - ") : ''; ?>Code coverage = round($coveredPercent) ?> %
+ sources have = number_format($allLinesCount) ?> lines of code in = number_format(count($files)) ?> files
+
+
+
+
+
+
- class ? " class='$info->class'" : '' ?>>
- = $info->coverage ?> %
-
- = $info->name ?>
-
+
+
+
+ ↓↑ %
+
+
+
+
+
+ path↓↑
+
+
+
+
+
+
+
+
+
+
+
+ addClickListener('tab-item', function(e) {
+ e.preventDefault();
+ let tabs = document.getElementsByClassName('tab-content');
+ for (let i = 0; i < tabs.length; i++) {
+ tabs[i].style.display = 'none';
+ }
+ let tabItems = document.getElementsByClassName('tab-item');
+ for (let i = 0; i < tabItems.length; i++) {
+ tabItems[i].classList.remove('active');
+ }
+ this.classList.add('active');
+
+ let id = this.href.split('#')[1];
+ if (id === 'files') {
+ initFiles();
+ } else {
+ initDirectories();
+ }
+
+ let el = document.getElementById(id);
+ if (el.style.display === 'block') {
+ el.style.display = 'none';
+ } else {
+ el.style.display = 'block';
+ }
+ });
+
+ document.addEventListener("DOMContentLoaded", function(event) {
+ initFiles(true);
+
+ let el = document.getElementById(window.location.hash.replace(/^#|L\d+$/g, ''));
+ if (el) {
+ initFileContent(el);
+ el.style.display = 'block';
+ }
+ });
+ })();
+