@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | /** @var CounterValuesInterface $report */ |
| 33 | 33 | return |
| 34 | 34 | sprintf( |
| 35 | - self::COUNTER . ': %s%s', |
|
| 35 | + self::COUNTER.': %s%s', |
|
| 36 | 36 | (string)$report->getValue(), |
| 37 | 37 | $eol ? PHP_EOL : '' |
| 38 | 38 | ); |
@@ -47,15 +47,15 @@ discard block |
||
| 47 | 47 | { |
| 48 | 48 | return |
| 49 | 49 | sprintf( |
| 50 | - self::COUNTER . '[%s]: ' . |
|
| 51 | - self::VALUE . ': %s, ' . |
|
| 52 | - self::STEP . ': %s, ' . |
|
| 53 | - self::BUMPED . ': %s, ' . |
|
| 54 | - self::PATH . ': %s, ' . |
|
| 55 | - self::LENGTH . ': %s, ' . |
|
| 56 | - self::MAX . ': %s, ' . |
|
| 57 | - self::MIN . ': %s, ' . |
|
| 58 | - self::DIFF . ': %s %s', |
|
| 50 | + self::COUNTER.'[%s]: '. |
|
| 51 | + self::VALUE.': %s, '. |
|
| 52 | + self::STEP.': %s, '. |
|
| 53 | + self::BUMPED.': %s, '. |
|
| 54 | + self::PATH.': %s, '. |
|
| 55 | + self::LENGTH.': %s, '. |
|
| 56 | + self::MAX.': %s, '. |
|
| 57 | + self::MIN.': %s, '. |
|
| 58 | + self::DIFF.': %s %s', |
|
| 59 | 59 | $report->getName(), |
| 60 | 60 | (string)$report->getValue(), |
| 61 | 61 | (string)$report->getStep(), |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | return |
| 79 | 79 | sprintf( |
| 80 | - self::FORWARD . '%s ' . self::BACKWARD . '%s', |
|
| 80 | + self::FORWARD.'%s '.self::BACKWARD.'%s', |
|
| 81 | 81 | $report->getBumped(), |
| 82 | 82 | $report->getBumpedBack() |
| 83 | 83 | ); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** @var CounterValuesInterface $report */ |
| 32 | 32 | return |
| 33 | 33 | sprintf( |
| 34 | - self::COUNTER . ': %s%s', |
|
| 34 | + self::COUNTER.': %s%s', |
|
| 35 | 35 | (string)$report->getValue(), |
| 36 | 36 | $eol ? PHP_EOL : '' |
| 37 | 37 | ); |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | return |
| 48 | 48 | sprintf( |
| 49 | - self::COUNTER . '[%s]: ' . |
|
| 50 | - self::VALUE . ': %s, ' . |
|
| 51 | - self::STEP . ': %s, ' . |
|
| 52 | - self::BUMPED . ': %s, ' . |
|
| 49 | + self::COUNTER.'[%s]: '. |
|
| 50 | + self::VALUE.': %s, '. |
|
| 51 | + self::STEP.': %s, '. |
|
| 52 | + self::BUMPED.': %s, '. |
|
| 53 | 53 | $report->getName(), |
| 54 | 54 | (string)$report->getValue(), |
| 55 | 55 | (string)$report->getStep(), |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | return |
| 68 | 68 | sprintf( |
| 69 | - self::FORWARD . '%s ', |
|
| 69 | + self::FORWARD.'%s ', |
|
| 70 | 70 | $report->getBumped() |
| 71 | 71 | ); |
| 72 | 72 | } |
@@ -168,6 +168,6 @@ |
||
| 168 | 168 | if ($formatter instanceof ProfilerReportFormatter) { |
| 169 | 169 | static::setProfilerReportFormatter($formatter); |
| 170 | 170 | } |
| 171 | - throw new \RuntimeException('Formatter [' . typeOf($formatter) .'] is not accepted.'); |
|
| 171 | + throw new \RuntimeException('Formatter ['.typeOf($formatter).'] is not accepted.'); |
|
| 172 | 172 | } |
| 173 | 173 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | public function check(?int $iterationNumber = null): self |
| 68 | 68 | { |
| 69 | 69 | if ($this->isStopped()) { |
| 70 | - throw new \RuntimeException('Timer[' . $this->name . '] is already stopped.'); |
|
| 70 | + throw new \RuntimeException('Timer['.$this->name.'] is already stopped.'); |
|
| 71 | 71 | } |
| 72 | 72 | if ($this->isNotStarted()) { |
| 73 | 73 | $this->start(); |
@@ -4,4 +4,4 @@ |
||
| 4 | 4 | |
| 5 | 5 | // @codeCoverageIgnoreStart |
| 6 | 6 | /** @internal */ |
| 7 | -define(__NAMESPACE__ .'\HRTIMER_VALUE_COEFFICIENT', 1E9); |
|
| 7 | +define(__NAMESPACE__.'\HRTIMER_VALUE_COEFFICIENT', 1E9); |
|
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | protected function wrongReportable(string $expected, ReportableInterface $reportable): void |
| 28 | 28 | { |
| 29 | 29 | throw new \RuntimeException( |
| 30 | - 'Instance of [' . $expected . '] expected, [' . typeOf($reportable) . '] given' |
|
| 30 | + 'Instance of ['.$expected.'] expected, ['.typeOf($reportable).'] given' |
|
| 31 | 31 | ); |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | // There is almost no sense in using polyfill function. |
| 30 | 30 | // If you're REALLY need to use HRTimer set `$ignoreVersionRestrictions` to true. |
| 31 | 31 | // Otherwise use `Timer::class` instance instead. |
| 32 | - throw new \RuntimeException('[' . static::class . '] Your php version is below 7.3.0.'); |
|
| 32 | + throw new \RuntimeException('['.static::class.'] Your php version is below 7.3.0.'); |
|
| 33 | 33 | } |
| 34 | 34 | if (PHP_INT_SIZE < INT_SIZE_64BIT) { |
| 35 | 35 | // `HRTimer::class` is designed and tested in 64bit environment |
@@ -49,10 +49,10 @@ discard block |
||
| 49 | 49 | public function process(BenchmarkFunction $function): string |
| 50 | 50 | { |
| 51 | 51 | return |
| 52 | - $this->formatBenchmarkRelative($function) . |
|
| 52 | + $this->formatBenchmarkRelative($function). |
|
| 53 | 53 | (empty($exception = $this->formatException($function)) ? |
| 54 | 54 | PHP_EOL : |
| 55 | - static::EXCEPTIONS . PHP_EOL . $exception); |
|
| 55 | + static::EXCEPTIONS.PHP_EOL.$exception); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -153,8 +153,7 @@ discard block |
||
| 153 | 153 | $str = static::getExporter()->export($executionReturn); |
| 154 | 154 | return |
| 155 | 155 | 'array' === $type ? |
| 156 | - $str : |
|
| 157 | - sprintf( |
|
| 156 | + $str : sprintf( |
|
| 158 | 157 | '%s(%s)', |
| 159 | 158 | $type, |
| 160 | 159 | $str |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | return |
| 36 | 36 | sprintf( |
| 37 | - self::ELAPSED . ': %s %s', |
|
| 37 | + self::ELAPSED.': %s %s', |
|
| 38 | 38 | $this->refineElapsed($report->getElapsed()), |
| 39 | 39 | $eol ? PHP_EOL : '' |
| 40 | 40 | ); |
@@ -68,13 +68,13 @@ discard block |
||
| 68 | 68 | { |
| 69 | 69 | $r = $report; |
| 70 | 70 | return sprintf( |
| 71 | - self::TIMER . '%s: ' . |
|
| 72 | - self::AVERAGE . ': %s, ' . |
|
| 73 | - self::LAST . ': %s, ' . |
|
| 74 | - self::MIN . '(%s): %s, ' . |
|
| 75 | - self::MAX . '(%s): %s, ' . |
|
| 76 | - self::COUNT . ': %s, ' . |
|
| 77 | - self::ELAPSED . ': %s%s', |
|
| 71 | + self::TIMER.'%s: '. |
|
| 72 | + self::AVERAGE.': %s, '. |
|
| 73 | + self::LAST.': %s, '. |
|
| 74 | + self::MIN.'(%s): %s, '. |
|
| 75 | + self::MAX.'(%s): %s, '. |
|
| 76 | + self::COUNT.': %s, '. |
|
| 77 | + self::ELAPSED.': %s%s', |
|
| 78 | 78 | $this->refineName($r->getName()), |
| 79 | 79 | $this->refineSeconds($r->getAverageValue()), |
| 80 | 80 | $this->refineSeconds($r->getLastValue()), |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if (DEFAULT_NAME === $name) { |
| 94 | 94 | return ''; |
| 95 | 95 | } |
| 96 | - return '[' . $name . ']'; |
|
| 96 | + return '['.$name.']'; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | protected function refineSeconds(?float $seconds): string |