Completed
Pull Request — master (#265)
by Vincent
13:10
created
src/Hal/Report/Html/template/loc.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 
4 4
 <?php
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 
20 20
 // 2. percentil map
21 21
 $json = [];
22
-if(sizeof($array) > 1) {
22
+if (sizeof($array) > 1) {
23 23
     $range = range(0.5, 1, .05);
24 24
     foreach ($range as $percentil) {
25
-        $json[] = (object)[
25
+        $json[] = (object) [
26 26
             'lloc' => procentile($array, $percentil),
27 27
             'percentile' => $percentil * 100,
28 28
         ];
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 </div>
75 75
 
76 76
 
77
-<?php require __DIR__ . '/_footer.php'; ?>
77
+<?php require __DIR__.'/_footer.php'; ?>
78 78
 
79 79
 
80 80
 <script>
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/panel.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 $fullwidth = true;
3
-require __DIR__ . '/_header.php'; ?>
3
+require __DIR__.'/_header.php'; ?>
4 4
 
5 5
     <div class="row">
6 6
         <div class="column">
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                     <tbody>
82 82
                     <?php
83 83
                     $classesS = $classes;
84
-                    usort($classesS, function ($a, $b) {
84
+                    usort($classesS, function($a, $b) {
85 85
                         return strcmp($b['pageRank'], $a['pageRank']);
86 86
                     });
87 87
                     $classesS = array_slice($classesS, 0, 10);
@@ -128,4 +128,4 @@  discard block
 block discarded – undo
128 128
     </script>
129 129
 
130 130
 <?php
131
-require __DIR__ . '/_footer.php'; ?>
132 131
\ No newline at end of file
132
+require __DIR__.'/_footer.php'; ?>
133 133
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/_header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 <body>
14 14
 
15 15
 
16
-<div id="wrapper" class="<?php if(isset($fullwidth) && $fullwidth === true) {?>fullwidth<?php } ?>">
16
+<div id="wrapper" class="<?php if (isset($fullwidth) && $fullwidth === true) {?>fullwidth<?php } ?>">
17 17
     <div id="contentliquid">
18 18
         <div id="content">
19 19
 
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/violations.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <?php
4 4
 $map = [
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                     <tbody>
58 58
                     <?php foreach ($classes as $class) {
59 59
                         if (sizeof($class['violations']) > 0) {
60
-                            $currentId = 'bloc-' . uniqid();
60
+                            $currentId = 'bloc-'.uniqid();
61 61
                             ?>
62 62
 
63 63
                             <tr>
@@ -107,4 +107,4 @@  discard block
 block discarded – undo
107 107
             }
108 108
         }
109 109
     </script>
110
-<?php require __DIR__ . '/_footer.php'; ?>
111 110
\ No newline at end of file
111
+<?php require __DIR__.'/_footer.php'; ?>
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
     <div class="row">
3 3
         <div class="column">
4 4
             <div class="bloc bloc-number">
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                     <tbody>
62 62
                     <?php
63 63
                     $classesS = $classes;
64
-                    usort($classesS, function ($a, $b) {
64
+                    usort($classesS, function($a, $b) {
65 65
                         return strcmp($b['pageRank'], $a['pageRank']);
66 66
                     });
67 67
                     $classesS = array_slice($classesS, 0, 10);
@@ -90,4 +90,4 @@  discard block
 block discarded – undo
90 90
         };
91 91
     </script>
92 92
 
93
-<?php require __DIR__ . '/_footer.php'; ?>
94 93
\ No newline at end of file
94
+<?php require __DIR__.'/_footer.php'; ?>
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/_footer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 
4 4
 <!-- Sidebar -->
5
-<?php if(!isset($fullwidth) || $fullwidth === false) {?>
5
+<?php if (!isset($fullwidth) || $fullwidth === false) {?>
6 6
 <div id="sidebar">
7 7
     <div class="content">
8 8
         <div class="logo">
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
                             <path d="M0 0h24v24H0z" fill="none"/>
95 95
                             <path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"/>
96 96
                         </svg>
97
-                        Violations (<?php echo $sum->violations->total;?>)
97
+                        Violations (<?php echo $sum->violations->total; ?>)
98 98
                     </a>
99 99
                 </li>
100
-                <?php if($config->has('junit')) { ?>
100
+                <?php if ($config->has('junit')) { ?>
101 101
                     <li>
102 102
                         <a href="junit.html">
103 103
                             <svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                         </a>
109 109
                     </li>
110 110
                 <?php } ?>
111
-                <?php if($config->has('git')) { ?>
111
+                <?php if ($config->has('git')) { ?>
112 112
                 <li>
113 113
                     <a href="git.html">
114 114
                         <img src="images/logo-git.png" alt="">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/coupling.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php require __DIR__ . '/_header.php'; ?>
1
+<?php require __DIR__.'/_header.php'; ?>
2 2
 
3 3
 <div class="row">
4 4
     <div class="column">
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 </div>
40 40
 
41
-<?php require __DIR__ . '/_footer.php'; ?>
41
+<?php require __DIR__.'/_footer.php'; ?>
42 42
 
43 43
 
44 44
 <script type="text/javascript">
Please login to merge, or discard this patch.
src/Hal/Report/Html/template/oop.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/_header.php'; ?>
2
+require __DIR__.'/_header.php'; ?>
3 3
 
4 4
 <?php
5 5
 
@@ -88,4 +88,4 @@  discard block
 block discarded – undo
88 88
     </div>
89 89
 
90 90
 
91
-<?php require __DIR__ . '/_footer.php'; ?>
92 91
\ No newline at end of file
92
+<?php require __DIR__.'/_footer.php'; ?>
93 93
\ No newline at end of file
Please login to merge, or discard this patch.
src/Hal/Report/Html/Reporter.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@  discard block
 block discarded – undo
44 44
         $consolidated = new Consolidated($metrics);
45 45
 
46 46
         // history of builds
47
-        $today = (object)[
47
+        $today = (object) [
48 48
             'avg' => $consolidated->getAvg(),
49 49
             'sum' => $consolidated->getSum()
50 50
         ];
51
-        $files = glob($logDir . '/js/history-*.json');
51
+        $files = glob($logDir.'/js/history-*.json');
52 52
         $next = sizeof($files) + 1;
53 53
         $history = [];
54 54
         natsort($files);
@@ -57,34 +57,34 @@  discard block
 block discarded – undo
57 57
         }
58 58
 
59 59
         // copy sources
60
-        if(!file_exists($logDir . '/js')) {
60
+        if (!file_exists($logDir.'/js')) {
61 61
             mkdir($logDir.'/js', 0755, true);
62 62
         }
63
-        if(!file_exists($logDir . '/css')) {
63
+        if (!file_exists($logDir.'/css')) {
64 64
             mkdir($logDir.'/css', 0755, true);
65 65
         }
66
-        if(!file_exists($logDir . '/images')) {
66
+        if (!file_exists($logDir.'/images')) {
67 67
             mkdir($logDir.'/images', 0755, true);
68 68
         }
69
-        recurse_copy(__DIR__ . '/template/js', $logDir . '/js');
70
-        recurse_copy(__DIR__ . '/template/css', $logDir . '/css');
71
-        recurse_copy(__DIR__ . '/template/images', $logDir . '/images');
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 72
 
73 73
         // render dynamic pages
74
-        $this->renderPage(__DIR__ . '/template/index.php', $logDir . '/index.html', $consolidated, $history);
75
-        $this->renderPage(__DIR__ . '/template/loc.php', $logDir . '/loc.html', $consolidated, $history);
76
-        $this->renderPage(__DIR__ . '/template/relations.php', $logDir . '/relations.html', $consolidated, $history);
77
-        $this->renderPage(__DIR__ . '/template/coupling.php', $logDir . '/coupling.html', $consolidated, $history);
78
-        $this->renderPage(__DIR__ . '/template/all.php', $logDir . '/all.html', $consolidated, $history);
79
-        $this->renderPage(__DIR__ . '/template/oop.php', $logDir . '/oop.html', $consolidated, $history);
80
-        $this->renderPage(__DIR__ . '/template/complexity.php', $logDir . '/complexity.html', $consolidated, $history);
81
-        $this->renderPage(__DIR__ . '/template/panel.php', $logDir . '/panel.html', $consolidated, $history);
82
-        $this->renderPage(__DIR__ . '/template/violations.php', $logDir . '/violations.html', $consolidated, $history);
74
+        $this->renderPage(__DIR__.'/template/index.php', $logDir.'/index.html', $consolidated, $history);
75
+        $this->renderPage(__DIR__.'/template/loc.php', $logDir.'/loc.html', $consolidated, $history);
76
+        $this->renderPage(__DIR__.'/template/relations.php', $logDir.'/relations.html', $consolidated, $history);
77
+        $this->renderPage(__DIR__.'/template/coupling.php', $logDir.'/coupling.html', $consolidated, $history);
78
+        $this->renderPage(__DIR__.'/template/all.php', $logDir.'/all.html', $consolidated, $history);
79
+        $this->renderPage(__DIR__.'/template/oop.php', $logDir.'/oop.html', $consolidated, $history);
80
+        $this->renderPage(__DIR__.'/template/complexity.php', $logDir.'/complexity.html', $consolidated, $history);
81
+        $this->renderPage(__DIR__.'/template/panel.php', $logDir.'/panel.html', $consolidated, $history);
82
+        $this->renderPage(__DIR__.'/template/violations.php', $logDir.'/violations.html', $consolidated, $history);
83 83
         if ($this->config->has('git')) {
84
-            $this->renderPage(__DIR__ . '/template/git.php', $logDir . '/git.html', $consolidated, $history);
84
+            $this->renderPage(__DIR__.'/template/git.php', $logDir.'/git.html', $consolidated, $history);
85 85
         }
86 86
         if ($this->config->has('junit')) {
87
-            $this->renderPage(__DIR__ . '/template/junit.php', $logDir . '/junit.html', $consolidated, $history);
87
+            $this->renderPage(__DIR__.'/template/junit.php', $logDir.'/junit.html', $consolidated, $history);
88 88
         }
89 89
 
90 90
         // js data
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
         // json data
101 101
         file_put_contents(
102
-            $logDir . '/js/classes.js',
103
-            'var classes = ' . json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
102
+            $logDir.'/js/classes.js',
103
+            'var classes = '.json_encode($consolidated->getClasses(), JSON_PRETTY_PRINT)
104 104
         );
105 105
 
106 106
         $this->output->writeln(sprintf('HTML report generated in "%s" directory', $logDir),
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         $diff = $newValue - $oldValue;
171 171
         if ($diff > 0) {
172
-            $diff = '+' . $diff;
172
+            $diff = '+'.$diff;
173 173
         }
174 174
 
175 175
         $goodOrBad = 'neutral';
Please login to merge, or discard this patch.