@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | } |
137 | 137 | |
138 | 138 | // Scalar |
139 | - if (! is_object($var)) { |
|
139 | + if (!is_object($var)) { |
|
140 | 140 | return $var; |
141 | 141 | } |
142 | 142 | |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | $filter->apply( |
230 | 230 | $object, |
231 | 231 | $property->getName(), |
232 | - function ($object) { |
|
232 | + function($object) { |
|
233 | 233 | return $this->recursiveCopy($object); |
234 | 234 | } |
235 | 235 | ); |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | { |
266 | 266 | $matched = $this->first( |
267 | 267 | $filterRecords, |
268 | - function (array $record) use ($var) { |
|
268 | + function(array $record) use ($var) { |
|
269 | 269 | /* @var TypeMatcher $matcher */ |
270 | 270 | $matcher = $record['matcher']; |
271 | 271 |
@@ -35,7 +35,7 @@ |
||
35 | 35 | { |
36 | 36 | $copier = $this->copier; |
37 | 37 | |
38 | - $copy = function (SplDoublyLinkedList $list) use ($copier) { |
|
38 | + $copy = function(SplDoublyLinkedList $list) use ($copier) { |
|
39 | 39 | // Replace each element in the list with a deep copy of itself |
40 | 40 | for ($i = 1; $i <= $list->count(); $i++) { |
41 | 41 | $copy = $copier->recursiveCopy($list->shift()); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | |
9 | 9 | array_walk( |
10 | 10 | $filter, |
11 | - function (&$val, $key) { |
|
11 | + function(&$val, $key) { |
|
12 | 12 | $val = preg_replace('|[^0-9]|', '', $val); |
13 | 13 | } |
14 | 14 | ); |
@@ -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}"; |
@@ -209,7 +209,7 @@ |
||
209 | 209 | |
210 | 210 | $prefixes = ["C:$s", "$s"]; |
211 | 211 | |
212 | - foreach($prefixes as $p){ |
|
212 | + foreach ($prefixes as $p) { |
|
213 | 213 | yield [ |
214 | 214 | [ |
215 | 215 | "Money.php" => [] |
@@ -376,8 +376,8 @@ discard block |
||
376 | 376 | foreach ($this->traits as &$trait) { |
377 | 377 | foreach ($trait['methods'] as &$method) { |
378 | 378 | if ($method['executableLines'] > 0) { |
379 | - $method['coverage'] = ($method['executedLines'] / |
|
380 | - $method['executableLines']) * 100; |
|
379 | + $method['coverage'] = ($method['executedLines']/ |
|
380 | + $method['executableLines'])*100; |
|
381 | 381 | } else { |
382 | 382 | $method['coverage'] = 100; |
383 | 383 | } |
@@ -393,8 +393,8 @@ discard block |
||
393 | 393 | unset($method); |
394 | 394 | |
395 | 395 | if ($trait['executableLines'] > 0) { |
396 | - $trait['coverage'] = ($trait['executedLines'] / |
|
397 | - $trait['executableLines']) * 100; |
|
396 | + $trait['coverage'] = ($trait['executedLines']/ |
|
397 | + $trait['executableLines'])*100; |
|
398 | 398 | |
399 | 399 | if ($trait['coverage'] === 100) { |
400 | 400 | $this->numTestedClasses++; |
@@ -414,8 +414,8 @@ discard block |
||
414 | 414 | foreach ($this->classes as &$class) { |
415 | 415 | foreach ($class['methods'] as &$method) { |
416 | 416 | if ($method['executableLines'] > 0) { |
417 | - $method['coverage'] = ($method['executedLines'] / |
|
418 | - $method['executableLines']) * 100; |
|
417 | + $method['coverage'] = ($method['executedLines']/ |
|
418 | + $method['executableLines'])*100; |
|
419 | 419 | } else { |
420 | 420 | $method['coverage'] = 100; |
421 | 421 | } |
@@ -431,8 +431,8 @@ discard block |
||
431 | 431 | unset($method); |
432 | 432 | |
433 | 433 | if ($class['executableLines'] > 0) { |
434 | - $class['coverage'] = ($class['executedLines'] / |
|
435 | - $class['executableLines']) * 100; |
|
434 | + $class['coverage'] = ($class['executedLines']/ |
|
435 | + $class['executableLines'])*100; |
|
436 | 436 | |
437 | 437 | if ($class['coverage'] === 100) { |
438 | 438 | $this->numTestedClasses++; |
@@ -451,8 +451,8 @@ discard block |
||
451 | 451 | |
452 | 452 | foreach ($this->functions as &$function) { |
453 | 453 | if ($function['executableLines'] > 0) { |
454 | - $function['coverage'] = ($function['executedLines'] / |
|
455 | - $function['executableLines']) * 100; |
|
454 | + $function['coverage'] = ($function['executedLines']/ |
|
455 | + $function['executableLines'])*100; |
|
456 | 456 | } else { |
457 | 457 | $function['coverage'] = 100; |
458 | 458 | } |
@@ -579,16 +579,16 @@ discard block |
||
579 | 579 | private function crap(int $ccn, float $coverage): string |
580 | 580 | { |
581 | 581 | if ($coverage === 0) { |
582 | - return (string) ($ccn ** 2 + $ccn); |
|
582 | + return (string)($ccn ** 2 + $ccn); |
|
583 | 583 | } |
584 | 584 | |
585 | 585 | if ($coverage >= 95) { |
586 | - return (string) $ccn; |
|
586 | + return (string)$ccn; |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | return \sprintf( |
590 | 590 | '%01.2F', |
591 | - $ccn ** 2 * (1 - $coverage / 100) ** 3 + $ccn |
|
591 | + $ccn ** 2*(1 - $coverage/100) ** 3 + $ccn |
|
592 | 592 | ); |
593 | 593 | } |
594 | 594 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $percent = 100; |
27 | 27 | |
28 | 28 | if ($b > 0) { |
29 | - $percent = ($a / $b) * 100; |
|
29 | + $percent = ($a/$b)*100; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if ($asString) { |
@@ -103,7 +103,7 @@ |
||
103 | 103 | $report->getNumMethods() |
104 | 104 | ); |
105 | 105 | |
106 | - $colors['lines'] = $this->getCoverageColor( |
|
106 | + $colors['lines'] = $this->getCoverageColor( |
|
107 | 107 | $report->getNumExecutedLines(), |
108 | 108 | $report->getNumExecutableLines() |
109 | 109 | ); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | } elseif ($method['coverage'] === 100) { |
139 | 139 | $result['method']['100%']++; |
140 | 140 | } else { |
141 | - $key = \floor($method['coverage'] / 10) * 10; |
|
141 | + $key = \floor($method['coverage']/10)*10; |
|
142 | 142 | $key = $key . '-' . ($key + 10) . '%'; |
143 | 143 | $result['method'][$key]++; |
144 | 144 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } elseif ($class['coverage'] === 100) { |
150 | 150 | $result['class']['100%']++; |
151 | 151 | } else { |
152 | - $key = \floor($class['coverage'] / 10) * 10; |
|
152 | + $key = \floor($class['coverage']/10)*10; |
|
153 | 153 | $key = $key . '-' . ($key + 10) . '%'; |
154 | 154 | $result['class'][$key]++; |
155 | 155 | } |