Completed
Push — master ( f98f69...40d61a )
by Alec
02:46
created
src/Tools/AbstractTimer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Tools/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,4 +4,4 @@
 block discarded – undo
4 4
 
5 5
 // @codeCoverageIgnoreStart
6 6
 /** @internal */
7
-define(__NAMESPACE__ .'\HRTIMER_VALUE_COEFFICIENT', 1E9);
7
+define(__NAMESPACE__.'\HRTIMER_VALUE_COEFFICIENT', 1E9);
Please login to merge, or discard this patch.
src/Tools/Reports/Core/Report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Tools/HRTimer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
             // There is almost no sense to use polyfill function.
37 37
             // If you're REALLY need to use HRTimer set `$ignoreVersionRestrictions` to true.
38 38
             // Otherwise use `Timer::class` instance instead.
39
-            throw new \RuntimeException('[' . static::class . '] Your php version is below 7.3.0.');
39
+            throw new \RuntimeException('['.static::class.'] Your php version is below 7.3.0.');
40 40
         }
41 41
         if (PHP_INT_SIZE < INT_SIZE_64BIT) {
42 42
             // `HRTimer::class` is designed and tested in 64bit environment
Please login to merge, or discard this patch.
src/Tools/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
             return
82 82
                 static::getBenchmarkFunctionFormatter();
83 83
         }
84
-        throw new \RuntimeException('Formatter [' . typeOf($formatter) . '] is not accepted.');
84
+        throw new \RuntimeException('Formatter ['.typeOf($formatter).'] is not accepted.');
85 85
     }
86 86
 
87 87
     /**
Please login to merge, or discard this patch.
src/Tools/Formatters/SimpleCounterReportFormatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         /** @var CounterValuesInterface $report */
36 36
         return
37 37
             sprintf(
38
-                self::COUNTER . ': %s%s',
38
+                self::COUNTER.': %s%s',
39 39
                 (string)$report->getValue(),
40 40
                 $eol ? PHP_EOL : ''
41 41
             );
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
     {
51 51
         return
52 52
             sprintf(
53
-                self::COUNTER . '[%s]: ' .
54
-                self::VALUE . ': %s, ' .
55
-                self::STEP . ': %s, ' .
56
-                self::BUMPED . ': %s%s',
53
+                self::COUNTER.'[%s]: '.
54
+                self::VALUE.': %s, '.
55
+                self::STEP.': %s, '.
56
+                self::BUMPED.': %s%s',
57 57
                 $report->getName(),
58 58
                 (string)$report->getValue(),
59 59
                 (string)$report->getStep(),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         return
72 72
             sprintf(
73
-                self::FORWARD . '%s ',
73
+                self::FORWARD.'%s ',
74 74
                 $report->getBumped()
75 75
             );
76 76
     }
Please login to merge, or discard this patch.
src/Tools/Formatters/BenchmarkFunctionSymfonyFormatter.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
         return
39 39
             $this->theme->dark(
40 40
                 'array' === $type ?
41
-                    $str :
42
-                    sprintf(
41
+                    $str : sprintf(
43 42
                         '%s(%s)',
44 43
                         $type,
45 44
                         $str
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
     {
81 80
         return
82 81
             $rank === 1 ?
83
-                $this->averageFirst($average) :
84
-                $this->average($average);
82
+                $this->averageFirst($average) : $this->average($average);
85 83
     }
86 84
 
87 85
     protected function averageFirst(float $average): string
Please login to merge, or discard this patch.
src/Tools/Formatters/TimerReportFormatter.php 1 patch
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         return
38 38
             sprintf(
39
-                self::ELAPSED . ': %s %s',
39
+                self::ELAPSED.': %s %s',
40 40
                 $this->refineElapsed($report->getElapsed()),
41 41
                 $eol ? PHP_EOL : ''
42 42
             );
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
         $values =
74 74
             0 < $count ?
75 75
                 sprintf(
76
-                    self::AVERAGE . ': %s, ' .
77
-                    self::LAST . ': %s, ' .
78
-                    self::MIN . '(%s): %s, ' .
79
-                    self::MAX . '(%s): %s, ' .
80
-                    self::MARKS . ': %s, ',
76
+                    self::AVERAGE.': %s, '.
77
+                    self::LAST.': %s, '.
78
+                    self::MIN.'(%s): %s, '.
79
+                    self::MAX.'(%s): %s, '.
80
+                    self::MARKS.': %s, ',
81 81
                     $this->refineSeconds($r->getAverageValue()),
82 82
                     $this->refineSeconds($r->getLastValue()),
83 83
                     $r->getMinValueIteration(),
@@ -85,13 +85,12 @@  discard block
 block discarded – undo
85 85
                     $r->getMaxValueIteration(),
86 86
                     $this->refineSeconds($r->getMaxValue()),
87 87
                     $count
88
-                ) :
89
-                '';
88
+                ) : '';
90 89
 
91 90
         return
92 91
             sprintf(
93
-                self::TIMER . '%s: %s' .
94
-                self::ELAPSED . ': %s%s',
92
+                self::TIMER.'%s: %s'.
93
+                self::ELAPSED.': %s%s',
95 94
                 $this->refineName($r->getName()),
96 95
                 $values,
97 96
                 $this->refineElapsed($r->getElapsed()),
@@ -110,6 +109,6 @@  discard block
 block discarded – undo
110 109
         if (DEFAULT_NAME === $name) {
111 110
             return '';
112 111
         }
113
-        return '[' . $name . ']';
112
+        return '['.$name.']';
114 113
     }
115 114
 }
Please login to merge, or discard this patch.
src/Tools/Formatters/ExtendedCounterReportFormatter.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             );
Please login to merge, or discard this patch.