@@ -40,6 +40,6 @@ |
||
| 40 | 40 | return |
| 41 | 41 | new BenchmarkReport($reportable); |
| 42 | 42 | } |
| 43 | - throw new \RuntimeException('Attempt to create unimplemented report: ' . typeOf($reportable)); |
|
| 43 | + throw new \RuntimeException('Attempt to create unimplemented report: '.typeOf($reportable)); |
|
| 44 | 44 | } |
| 45 | 45 | } |
@@ -19,6 +19,6 @@ |
||
| 19 | 19 | public function __toString(): string |
| 20 | 20 | { |
| 21 | 21 | return |
| 22 | - brackets(typeOf($this) . '::' . __FUNCTION__) . ' Not implemented!'; |
|
| 22 | + brackets(typeOf($this).'::'.__FUNCTION__).' Not implemented!'; |
|
| 23 | 23 | } |
| 24 | 24 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | return |
| 56 | 56 | sprintf( |
| 57 | - 'Timer:[%s] Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s' . PHP_EOL, |
|
| 57 | + 'Timer:[%s] Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s'.PHP_EOL, |
|
| 58 | 58 | $name, |
| 59 | 59 | format_time($this->getAverageValue()), |
| 60 | 60 | format_time($this->getLastValue()), |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | public function getEnumeratedName(): string |
| 89 | 89 | { |
| 90 | 90 | return |
| 91 | - brackets((string)$this->index, BRACKETS_ANGLE) . ' ' . $this->name; |
|
| 91 | + brackets((string)$this->index, BRACKETS_ANGLE).' '.$this->name; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $this->iterations = $iterations; |
| 42 | 42 | $this->rewindable = |
| 43 | 43 | new Rewindable( |
| 44 | - function (int $iterations, int $i = 1): \Generator { |
|
| 44 | + function(int $iterations, int $i = 1): \Generator { |
|
| 45 | 45 | while ($i <= $iterations) { |
| 46 | 46 | yield $i++; |
| 47 | 47 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $result = \call_user_func($function, ...$args); |
| 120 | 120 | } catch (\Throwable $e) { |
| 121 | 121 | $this->errorState = true; |
| 122 | - $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
| 122 | + $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
| 123 | 123 | $this->exceptionMessages[$f->getIndexedName()] = $result; |
| 124 | 124 | } |
| 125 | 125 | $f->setResult($result); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function __toString(): string |
| 42 | 42 | { |
| 43 | 43 | $profilerReport = (string)$this->getProfiler()->getReport(); |
| 44 | - $r = 'Benchmark:' . PHP_EOL; |
|
| 44 | + $r = 'Benchmark:'.PHP_EOL; |
|
| 45 | 45 | foreach ($this->computeRelatives() as $indexName => $result) { |
| 46 | 46 | $function = $this->getFunctionObject($indexName); |
| 47 | 47 | $arguments = $function->getArgs(); |
@@ -60,17 +60,17 @@ discard block |
||
| 60 | 60 | PHP_EOL |
| 61 | 61 | ); |
| 62 | 62 | if ($this->withResults) { |
| 63 | - $r .= var_export($function->getResult(), true) . PHP_EOL; |
|
| 63 | + $r .= var_export($function->getResult(), true).PHP_EOL; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | if (!empty($this->exceptionMessages)) { |
| 67 | - $r .= 'Exceptions:'. PHP_EOL; |
|
| 67 | + $r .= 'Exceptions:'.PHP_EOL; |
|
| 68 | 68 | foreach ($this->exceptionMessages as $name => $exceptionMessage) { |
| 69 | - $r .= brackets($name). ': '. $exceptionMessage . PHP_EOL; |
|
| 69 | + $r .= brackets($name).': '.$exceptionMessage.PHP_EOL; |
|
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | return |
| 73 | - $r . PHP_EOL . $profilerReport; |
|
| 73 | + $r.PHP_EOL.$profilerReport; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | foreach ($relatives as $name => $relative) { |
| 94 | 94 | $relatives[$name] = |
| 95 | - $this->percent((float)$relative - 1) . ' ' . |
|
| 95 | + $this->percent((float)$relative - 1).' '. |
|
| 96 | 96 | brackets(format_time($averages[$name]), BRACKETS_PARENTHESES); |
| 97 | 97 | } |
| 98 | 98 | return $relatives; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | private function percent(float $relative): string |
| 122 | 122 | { |
| 123 | 123 | return |
| 124 | - number_format($relative * 100, 1) . '%'; |
|
| 124 | + number_format($relative * 100, 1).'%'; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |