@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | function &foo($bar) |
13 | 13 | { |
14 | - $baz = function () {}; |
|
14 | + $baz = function() {}; |
|
15 | 15 | $a = true ? true : false; |
16 | 16 | $b = "{$a}"; |
17 | 17 | $c = "${b}"; |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | function &foo($bar) |
15 | 15 | { |
16 | - $baz = function () {}; |
|
16 | + $baz = function() {}; |
|
17 | 17 | $a = true ? true : false; |
18 | 18 | $b = "{$a}"; |
19 | 19 | $c = "${b}"; |
@@ -46,7 +46,7 @@ |
||
46 | 46 | $message = ''; |
47 | 47 | |
48 | 48 | foreach ($this->unintentionallyCoveredUnits as $unit) { |
49 | - $message .= '- ' . $unit . "\n"; |
|
49 | + $message .= '- '.$unit."\n"; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | return $message; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | sprintf( |
28 | 28 | 'Argument #%d%sof %s::%s() must be a %s', |
29 | 29 | $argument, |
30 | - $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ', |
|
30 | + $value !== null ? ' ('.gettype($value).'#'.$value.')' : ' (No Value) ', |
|
31 | 31 | $stack[1]['class'], |
32 | 32 | $stack[1]['function'], |
33 | 33 | $type |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->generator = $generator; |
52 | 52 | $this->highLowerBound = $highLowerBound; |
53 | 53 | $this->lowUpperBound = $lowUpperBound; |
54 | - $this->templatePath = __DIR__ . '/Renderer/Template/'; |
|
54 | + $this->templatePath = __DIR__.'/Renderer/Template/'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -94,27 +94,27 @@ discard block |
||
94 | 94 | $this->highLowerBound |
95 | 95 | ); |
96 | 96 | |
97 | - $directory->render($report, $target . 'index.html'); |
|
98 | - $dashboard->render($report, $target . 'dashboard.html'); |
|
97 | + $directory->render($report, $target.'index.html'); |
|
98 | + $dashboard->render($report, $target.'dashboard.html'); |
|
99 | 99 | |
100 | 100 | foreach ($report as $node) { |
101 | 101 | $id = $node->getId(); |
102 | 102 | |
103 | 103 | if ($node instanceof DirectoryNode) { |
104 | - if (!file_exists($target . $id)) { |
|
105 | - mkdir($target . $id, 0777, true); |
|
104 | + if (!file_exists($target.$id)) { |
|
105 | + mkdir($target.$id, 0777, true); |
|
106 | 106 | } |
107 | 107 | |
108 | - $directory->render($node, $target . $id . '/index.html'); |
|
109 | - $dashboard->render($node, $target . $id . '/dashboard.html'); |
|
108 | + $directory->render($node, $target.$id.'/index.html'); |
|
109 | + $dashboard->render($node, $target.$id.'/dashboard.html'); |
|
110 | 110 | } else { |
111 | - $dir = dirname($target . $id); |
|
111 | + $dir = dirname($target.$id); |
|
112 | 112 | |
113 | 113 | if (!file_exists($dir)) { |
114 | 114 | mkdir($dir, 0777, true); |
115 | 115 | } |
116 | 116 | |
117 | - $file->render($node, $target . $id . '.html'); |
|
117 | + $file->render($node, $target.$id.'.html'); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -126,37 +126,37 @@ discard block |
||
126 | 126 | */ |
127 | 127 | private function copyFiles($target) |
128 | 128 | { |
129 | - $dir = $this->getDirectory($target . '.css'); |
|
129 | + $dir = $this->getDirectory($target.'.css'); |
|
130 | 130 | |
131 | 131 | file_put_contents( |
132 | - $dir . 'bootstrap.min.css', |
|
132 | + $dir.'bootstrap.min.css', |
|
133 | 133 | str_replace( |
134 | 134 | 'url(../fonts/', |
135 | 135 | 'url(../.fonts/', |
136 | - file_get_contents($this->templatePath . 'css/bootstrap.min.css') |
|
136 | + file_get_contents($this->templatePath.'css/bootstrap.min.css') |
|
137 | 137 | ) |
138 | 138 | |
139 | 139 | ); |
140 | 140 | |
141 | - copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css'); |
|
142 | - copy($this->templatePath . 'css/style.css', $dir . 'style.css'); |
|
143 | - |
|
144 | - $dir = $this->getDirectory($target . '.fonts'); |
|
145 | - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot'); |
|
146 | - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg'); |
|
147 | - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf'); |
|
148 | - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff'); |
|
149 | - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff2', $dir . 'glyphicons-halflings-regular.woff2'); |
|
150 | - |
|
151 | - $dir = $this->getDirectory($target . '.js'); |
|
152 | - copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js'); |
|
153 | - copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js'); |
|
154 | - copy($this->templatePath . 'js/holder.min.js', $dir . 'holder.min.js'); |
|
155 | - copy($this->templatePath . 'js/html5shiv.min.js', $dir . 'html5shiv.min.js'); |
|
156 | - copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); |
|
157 | - copy($this->templatePath . 'js/nv.d3.min.js', $dir . 'nv.d3.min.js'); |
|
158 | - copy($this->templatePath . 'js/respond.min.js', $dir . 'respond.min.js'); |
|
159 | - copy($this->templatePath . 'js/file.js', $dir . 'file.js'); |
|
141 | + copy($this->templatePath.'css/nv.d3.min.css', $dir.'nv.d3.min.css'); |
|
142 | + copy($this->templatePath.'css/style.css', $dir.'style.css'); |
|
143 | + |
|
144 | + $dir = $this->getDirectory($target.'.fonts'); |
|
145 | + copy($this->templatePath.'fonts/glyphicons-halflings-regular.eot', $dir.'glyphicons-halflings-regular.eot'); |
|
146 | + copy($this->templatePath.'fonts/glyphicons-halflings-regular.svg', $dir.'glyphicons-halflings-regular.svg'); |
|
147 | + copy($this->templatePath.'fonts/glyphicons-halflings-regular.ttf', $dir.'glyphicons-halflings-regular.ttf'); |
|
148 | + copy($this->templatePath.'fonts/glyphicons-halflings-regular.woff', $dir.'glyphicons-halflings-regular.woff'); |
|
149 | + copy($this->templatePath.'fonts/glyphicons-halflings-regular.woff2', $dir.'glyphicons-halflings-regular.woff2'); |
|
150 | + |
|
151 | + $dir = $this->getDirectory($target.'.js'); |
|
152 | + copy($this->templatePath.'js/bootstrap.min.js', $dir.'bootstrap.min.js'); |
|
153 | + copy($this->templatePath.'js/d3.min.js', $dir.'d3.min.js'); |
|
154 | + copy($this->templatePath.'js/holder.min.js', $dir.'holder.min.js'); |
|
155 | + copy($this->templatePath.'js/html5shiv.min.js', $dir.'html5shiv.min.js'); |
|
156 | + copy($this->templatePath.'js/jquery.min.js', $dir.'jquery.min.js'); |
|
157 | + copy($this->templatePath.'js/nv.d3.min.js', $dir.'nv.d3.min.js'); |
|
158 | + copy($this->templatePath.'js/respond.min.js', $dir.'respond.min.js'); |
|
159 | + copy($this->templatePath.'js/file.js', $dir.'file.js'); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | */ |
79 | 79 | protected function renderItemTemplate(\Text_Template $template, array $data) |
80 | 80 | { |
81 | - $numSeparator = ' / '; |
|
81 | + $numSeparator = ' / '; |
|
82 | 82 | |
83 | 83 | if (isset($data['numClasses']) && $data['numClasses'] > 0) { |
84 | 84 | $classesLevel = $this->getColorLevel($data['testedClassesPercent']); |
85 | 85 | |
86 | - $classesNumber = $data['numTestedClasses'] . $numSeparator . |
|
86 | + $classesNumber = $data['numTestedClasses'].$numSeparator. |
|
87 | 87 | $data['numClasses']; |
88 | 88 | |
89 | 89 | $classesBar = $this->getCoverageBar( |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ); |
92 | 92 | } else { |
93 | 93 | $classesLevel = ''; |
94 | - $classesNumber = '0' . $numSeparator . '0'; |
|
94 | + $classesNumber = '0'.$numSeparator.'0'; |
|
95 | 95 | $classesBar = ''; |
96 | 96 | $data['testedClassesPercentAsString'] = 'n/a'; |
97 | 97 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if ($data['numMethods'] > 0) { |
100 | 100 | $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']); |
101 | 101 | |
102 | - $methodsNumber = $data['numTestedMethods'] . $numSeparator . |
|
102 | + $methodsNumber = $data['numTestedMethods'].$numSeparator. |
|
103 | 103 | $data['numMethods']; |
104 | 104 | |
105 | 105 | $methodsBar = $this->getCoverageBar( |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ); |
108 | 108 | } else { |
109 | 109 | $methodsLevel = ''; |
110 | - $methodsNumber = '0' . $numSeparator . '0'; |
|
110 | + $methodsNumber = '0'.$numSeparator.'0'; |
|
111 | 111 | $methodsBar = ''; |
112 | 112 | $data['testedMethodsPercentAsString'] = 'n/a'; |
113 | 113 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($data['numExecutableLines'] > 0) { |
116 | 116 | $linesLevel = $this->getColorLevel($data['linesExecutedPercent']); |
117 | 117 | |
118 | - $linesNumber = $data['numExecutedLines'] . $numSeparator . |
|
118 | + $linesNumber = $data['numExecutedLines'].$numSeparator. |
|
119 | 119 | $data['numExecutableLines']; |
120 | 120 | |
121 | 121 | $linesBar = $this->getCoverageBar( |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | ); |
124 | 124 | } else { |
125 | 125 | $linesLevel = ''; |
126 | - $linesNumber = '0' . $numSeparator . '0'; |
|
126 | + $linesNumber = '0'.$numSeparator.'0'; |
|
127 | 127 | $linesBar = ''; |
128 | 128 | $data['linesExecutedPercentAsString'] = 'n/a'; |
129 | 129 | } |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | protected function getActiveBreadcrumb(AbstractNode $node) |
206 | 206 | { |
207 | 207 | $buffer = sprintf( |
208 | - ' <li class="active">%s</li>' . "\n", |
|
208 | + ' <li class="active">%s</li>'."\n", |
|
209 | 209 | $node->getName() |
210 | 210 | ); |
211 | 211 | |
212 | 212 | if ($node instanceof DirectoryNode) { |
213 | - $buffer .= ' <li>(<a href="dashboard.html">Dashboard</a>)</li>' . "\n"; |
|
213 | + $buffer .= ' <li>(<a href="dashboard.html">Dashboard</a>)</li>'."\n"; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $buffer; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | protected function getInactiveBreadcrumb(AbstractNode $node, $pathToRoot) |
220 | 220 | { |
221 | 221 | return sprintf( |
222 | - ' <li><a href="%sindex.html">%s</a></li>' . "\n", |
|
222 | + ' <li><a href="%sindex.html">%s</a></li>'."\n", |
|
223 | 223 | $pathToRoot, |
224 | 224 | $node->getName() |
225 | 225 | ); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $level = $this->getColorLevel($percent); |
244 | 244 | |
245 | 245 | $template = new \Text_Template( |
246 | - $this->templatePath . 'coverage_bar.html', |
|
246 | + $this->templatePath.'coverage_bar.html', |
|
247 | 247 | '{{', |
248 | 248 | '}}' |
249 | 249 | ); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function render(FileNode $node, $file) |
55 | 55 | { |
56 | - $template = new \Text_Template($this->templatePath . 'file.html', '{{', '}}'); |
|
56 | + $template = new \Text_Template($this->templatePath.'file.html', '{{', '}}'); |
|
57 | 57 | |
58 | 58 | $template->setVar( |
59 | 59 | [ |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | protected function renderItems(FileNode $node) |
76 | 76 | { |
77 | - $template = new \Text_Template($this->templatePath . 'file_item.html', '{{', '}}'); |
|
77 | + $template = new \Text_Template($this->templatePath.'file_item.html', '{{', '}}'); |
|
78 | 78 | |
79 | 79 | $methodItemTemplate = new \Text_Template( |
80 | - $this->templatePath . 'method_item.html', |
|
80 | + $this->templatePath.'method_item.html', |
|
81 | 81 | '{{', |
82 | 82 | '}}' |
83 | 83 | ); |
@@ -315,9 +315,9 @@ discard block |
||
315 | 315 | $popoverContent = '<ul>'; |
316 | 316 | |
317 | 317 | if ($numTests > 1) { |
318 | - $popoverTitle = $numTests . ' tests cover line ' . $i; |
|
318 | + $popoverTitle = $numTests.' tests cover line '.$i; |
|
319 | 319 | } else { |
320 | - $popoverTitle = '1 test covers line ' . $i; |
|
320 | + $popoverTitle = '1 test covers line '.$i; |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | foreach ($coverageData[$i] as $test) { |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } |
370 | 370 | |
371 | 371 | $popoverContent .= '</ul>'; |
372 | - $trClass = ' class="' . $lineCss . ' popin"'; |
|
372 | + $trClass = ' class="'.$lineCss.' popin"'; |
|
373 | 373 | } |
374 | 374 | } |
375 | 375 | |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | } |
385 | 385 | |
386 | 386 | $lines .= sprintf( |
387 | - ' <tr%s%s><td><div align="right"><a name="%d"></a><a href="#%d">%d</a></div></td><td class="codeLine">%s</td></tr>' . "\n", |
|
387 | + ' <tr%s%s><td><div align="right"><a name="%d"></a><a href="#%d">%d</a></div></td><td class="codeLine">%s</td></tr>'."\n", |
|
388 | 388 | $trClass, |
389 | 389 | $popover, |
390 | 390 | $i, |
@@ -26,14 +26,14 @@ discard block |
||
26 | 26 | { |
27 | 27 | $classes = $node->getClassesAndTraits(); |
28 | 28 | $template = new \Text_Template( |
29 | - $this->templatePath . 'dashboard.html', |
|
29 | + $this->templatePath.'dashboard.html', |
|
30 | 30 | '{{', |
31 | 31 | '}}' |
32 | 32 | ); |
33 | 33 | |
34 | 34 | $this->setCommonTemplateVariables($template, $node); |
35 | 35 | |
36 | - $baseLink = $node->getId() . '/'; |
|
36 | + $baseLink = $node->getId().'/'; |
|
37 | 37 | $complexity = $this->complexity($classes, $baseLink); |
38 | 38 | $coverageDistribution = $this->coverageDistribution($classes); |
39 | 39 | $insufficientCoverage = $this->insufficientCoverage($classes, $baseLink); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | foreach ($classes as $className => $class) { |
71 | 71 | foreach ($class['methods'] as $methodName => $method) { |
72 | 72 | if ($className != '*') { |
73 | - $methodName = $className . '::' . $methodName; |
|
73 | + $methodName = $className.'::'.$methodName; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $result['method'][] = [ |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $result['method']['100%']++; |
150 | 150 | } else { |
151 | 151 | $key = floor($method['coverage'] / 10) * 10; |
152 | - $key = $key . '-' . ($key + 10) . '%'; |
|
152 | + $key = $key.'-'.($key + 10).'%'; |
|
153 | 153 | $result['method'][$key]++; |
154 | 154 | } |
155 | 155 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $result['class']['100%']++; |
161 | 161 | } else { |
162 | 162 | $key = floor($class['coverage'] / 10) * 10; |
163 | - $key = $key . '-' . ($key + 10) . '%'; |
|
163 | + $key = $key.'-'.($key + 10).'%'; |
|
164 | 164 | $result['class'][$key]++; |
165 | 165 | } |
166 | 166 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | foreach ($class['methods'] as $methodName => $method) { |
190 | 190 | if ($method['coverage'] < $this->highLowerBound) { |
191 | 191 | if ($className != '*') { |
192 | - $key = $className . '::' . $methodName; |
|
192 | + $key = $className.'::'.$methodName; |
|
193 | 193 | } else { |
194 | 194 | $key = $methodName; |
195 | 195 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | foreach ($leastTestedClasses as $className => $coverage) { |
210 | 210 | $result['class'] .= sprintf( |
211 | - ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d%%</td></tr>' . "\n", |
|
211 | + ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d%%</td></tr>'."\n", |
|
212 | 212 | str_replace($baseLink, '', $classes[$className]['link']), |
213 | 213 | $className, |
214 | 214 | $coverage |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | list($class, $method) = explode('::', $methodName); |
220 | 220 | |
221 | 221 | $result['method'] .= sprintf( |
222 | - ' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d%%</td></tr>' . "\n", |
|
222 | + ' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d%%</td></tr>'."\n", |
|
223 | 223 | str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), |
224 | 224 | $methodName, |
225 | 225 | $method, |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if ($method['coverage'] < $this->highLowerBound && |
250 | 250 | $method['ccn'] > 1) { |
251 | 251 | if ($className != '*') { |
252 | - $key = $className . '::' . $methodName; |
|
252 | + $key = $className.'::'.$methodName; |
|
253 | 253 | } else { |
254 | 254 | $key = $methodName; |
255 | 255 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | |
270 | 270 | foreach ($classRisks as $className => $crap) { |
271 | 271 | $result['class'] .= sprintf( |
272 | - ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d</td></tr>' . "\n", |
|
272 | + ' <tr><td><a href="%s">%s</a></td><td class="text-right">%d</td></tr>'."\n", |
|
273 | 273 | str_replace($baseLink, '', $classes[$className]['link']), |
274 | 274 | $className, |
275 | 275 | $crap |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | list($class, $method) = explode('::', $methodName); |
281 | 281 | |
282 | 282 | $result['method'] .= sprintf( |
283 | - ' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d</td></tr>' . "\n", |
|
283 | + ' <tr><td><a href="%s"><abbr title="%s">%s</abbr></a></td><td class="text-right">%d</td></tr>'."\n", |
|
284 | 284 | str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), |
285 | 285 | $methodName, |
286 | 286 | $method, |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | protected function getActiveBreadcrumb(AbstractNode $node) |
295 | 295 | { |
296 | 296 | return sprintf( |
297 | - ' <li><a href="index.html">%s</a></li>' . "\n" . |
|
298 | - ' <li class="active">(Dashboard)</li>' . "\n", |
|
297 | + ' <li><a href="index.html">%s</a></li>'."\n". |
|
298 | + ' <li class="active">(Dashboard)</li>'."\n", |
|
299 | 299 | $node->getName() |
300 | 300 | ); |
301 | 301 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function render(DirectoryNode $node, $file) |
26 | 26 | { |
27 | - $template = new \Text_Template($this->templatePath . 'directory.html', '{{', '}}'); |
|
27 | + $template = new \Text_Template($this->templatePath.'directory.html', '{{', '}}'); |
|
28 | 28 | |
29 | 29 | $this->setCommonTemplateVariables($template, $node); |
30 | 30 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this->renderItemTemplate( |
97 | - new \Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), |
|
97 | + new \Text_Template($this->templatePath.'directory_item.html', '{{', '}}'), |
|
98 | 98 | $data |
99 | 99 | ); |
100 | 100 | } |