@@ -105,7 +105,7 @@ |
||
| 105 | 105 | protected function assertTimes(int $times): int |
| 106 | 106 | { |
| 107 | 107 | if ($times < 1) { |
| 108 | - throw new \RuntimeException(__METHOD__ . ' parameter 0 should be positive non-zero integer.'); |
|
| 108 | + throw new \RuntimeException(__METHOD__.' parameter 0 should be positive non-zero integer.'); |
|
| 109 | 109 | } |
| 110 | 110 | return $times; |
| 111 | 111 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | return |
| 38 | 38 | sprintf( |
| 39 | - self::ELAPSED . ': %s %s', |
|
| 39 | + self::ELAPSED.': %s %s', |
|
| 40 | 40 | $this->ftime($this->report->getElapsed()), |
| 41 | 41 | $eol ? PHP_EOL : '' |
| 42 | 42 | ); |
@@ -55,13 +55,13 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $r = $this->report; |
| 57 | 57 | return sprintf( |
| 58 | - self::TIMER . '[%s]: ' . |
|
| 59 | - self::AVERAGE . ': %s, ' . |
|
| 60 | - self::LAST . ': %s, ' . |
|
| 61 | - self::MIN . '(%s): %s, ' . |
|
| 62 | - self::MAX . '(%s): %s, ' . |
|
| 63 | - self::COUNT . ': %s, ' . |
|
| 64 | - self::ELAPSED . ': %s%s', |
|
| 58 | + self::TIMER.'[%s]: '. |
|
| 59 | + self::AVERAGE.': %s, '. |
|
| 60 | + self::LAST.': %s, '. |
|
| 61 | + self::MIN.'(%s): %s, '. |
|
| 62 | + self::MAX.'(%s): %s, '. |
|
| 63 | + self::COUNT.': %s, '. |
|
| 64 | + self::ELAPSED.': %s%s', |
|
| 65 | 65 | $r->getName(), |
| 66 | 66 | $this->ftime($r->getAverageValue()), |
| 67 | 67 | $this->ftime($r->getLastValue()), |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | { |
| 23 | 23 | $rank = 0; |
| 24 | 24 | $profilerReport = (string)$this->report->getProfiler()->getReport(); |
| 25 | - $r = 'Benchmark:' . PHP_EOL; |
|
| 25 | + $r = 'Benchmark:'.PHP_EOL; |
|
| 26 | 26 | /** @var BenchmarkRelative $result */ |
| 27 | 27 | foreach ($this->report->getRelatives() as $indexName => $result) { |
| 28 | 28 | $relative = $result->getRelative(); |
@@ -50,18 +50,18 @@ discard block |
||
| 50 | 50 | $result = $function->getResult(); |
| 51 | 51 | var_dump($result); |
| 52 | 52 | dump($result); |
| 53 | - $r .= self::RESULT . ': ' . $this->typeOf($result) . ' "' |
|
| 54 | - . var_export($function->getResult(), true) . '" ' . PHP_EOL; |
|
| 53 | + $r .= self::RESULT.': '.$this->typeOf($result).' "' |
|
| 54 | + . var_export($function->getResult(), true).'" '.PHP_EOL; |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | if (!empty($exceptionMessages = $this->report->getExceptionMessages())) { |
| 58 | - $r .= 'Exceptions:' . PHP_EOL; |
|
| 58 | + $r .= 'Exceptions:'.PHP_EOL; |
|
| 59 | 59 | foreach ($exceptionMessages as $name => $exceptionMessage) { |
| 60 | - $r .= brackets($name) . ': ' . $exceptionMessage . PHP_EOL; |
|
| 60 | + $r .= brackets($name).': '.$exceptionMessage.PHP_EOL; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | return |
| 64 | - $r . PHP_EOL . $profilerReport; |
|
| 64 | + $r.PHP_EOL.$profilerReport; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | return |
| 38 | 38 | sprintf( |
| 39 | - self::COUNTER . ': %s%s', |
|
| 39 | + self::COUNTER.': %s%s', |
|
| 40 | 40 | (string)$this->report->getValue(), |
| 41 | 41 | $eol ? PHP_EOL : '' |
| 42 | 42 | ); |
@@ -51,13 +51,13 @@ discard block |
||
| 51 | 51 | $bumped = $this->computeBumped(); |
| 52 | 52 | return |
| 53 | 53 | sprintf( |
| 54 | - self::COUNTER . '[%s]: ' . |
|
| 55 | - self::VALUE . ': %s, ' . |
|
| 56 | - self::STEP . ': %s, ' . |
|
| 57 | - self::BUMPED . ': %s, ' . |
|
| 58 | - self::PATH . ': %s, ' . |
|
| 59 | - self::LENGTH . ': %s, ' . |
|
| 60 | - self::DIFF . ': %s %s', |
|
| 54 | + self::COUNTER.'[%s]: '. |
|
| 55 | + self::VALUE.': %s, '. |
|
| 56 | + self::STEP.': %s, '. |
|
| 57 | + self::BUMPED.': %s, '. |
|
| 58 | + self::PATH.': %s, '. |
|
| 59 | + self::LENGTH.': %s, '. |
|
| 60 | + self::DIFF.': %s %s', |
|
| 61 | 61 | $this->report->getName(), |
| 62 | 62 | (string)$this->report->getValue(), |
| 63 | 63 | (string)$this->report->getStep(), |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | private function computeBumped(): string |
| 76 | 76 | { |
| 77 | 77 | return sprintf( |
| 78 | - self::FORWARD . '%s ' . self::BACKWARD . '%s', |
|
| 78 | + self::FORWARD.'%s '.self::BACKWARD.'%s', |
|
| 79 | 79 | $this->report->getBumpedForward(), |
| 80 | 80 | $this->report->getBumpedBack() |
| 81 | 81 | ); |
@@ -28,6 +28,6 @@ |
||
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | - return $r . $elapsed; |
|
| 31 | + return $r.$elapsed; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | return |
| 50 | 50 | new BenchmarkReport($reportable); |
| 51 | 51 | } |
| 52 | - throw new \RuntimeException('Attempt to create unimplemented report for: ' . typeOf($reportable)); |
|
| 52 | + throw new \RuntimeException('Attempt to create unimplemented report for: '.typeOf($reportable)); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -74,6 +74,6 @@ discard block |
||
| 74 | 74 | return |
| 75 | 75 | new BenchmarkReportFormatter($report); |
| 76 | 76 | } |
| 77 | - throw new \RuntimeException('Attempt to create unimplemented formatter for: ' . typeOf($report)); |
|
| 77 | + throw new \RuntimeException('Attempt to create unimplemented formatter for: '.typeOf($report)); |
|
| 78 | 78 | } |
| 79 | 79 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->humanReadableName = null; |
| 64 | 64 | $this->rewindable = |
| 65 | 65 | new Rewindable( |
| 66 | - function (int $iterations, int $i = 1): \Generator { |
|
| 66 | + function(int $iterations, int $i = 1): \Generator { |
|
| 67 | 67 | while ($i <= $iterations) { |
| 68 | 68 | yield $i++; |
| 69 | 69 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | try { |
| 127 | 127 | $result = $function(...$args); |
| 128 | 128 | } catch (\Throwable $e) { |
| 129 | - $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)) . ': ' . $e->getMessage(); |
|
| 129 | + $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)).': '.$e->getMessage(); |
|
| 130 | 130 | $this->exceptions[$f->getIndexedName()] = $e; |
| 131 | 131 | $f->setException($e); |
| 132 | 132 | } |