Completed
Push — develop ( a0bdf0...500e55 )
by Alec
02:54
created
src/Tools/Benchmark.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $this->iterations = $this->refineIterations($iterations);
60 60
 
61
-        $this->generatorFunction = function (int $iterations, int $i = 1): \Generator {
61
+        $this->generatorFunction = function(int $iterations, int $i = 1): \Generator {
62 62
             while ($i <= $iterations) {
63 63
                 yield $i++;
64 64
             }
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     {
83 83
         if ($iterations < self::MIN_ITERATIONS) {
84 84
             throw new \RuntimeException(
85
-                __CLASS__ .
86
-                ': Number of Iterations should be greater then ' .
85
+                __CLASS__.
86
+                ': Number of Iterations should be greater then '.
87 87
                 self::MIN_ITERATIONS
88 88
             );
89 89
         }
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/TimerReportFormatter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             }
23 23
             return $this->full($report);
24 24
         }
25
-        throw new \RuntimeException(TimerReport::class . ' expected ' . typeOf($report) . ' given');
25
+        throw new \RuntimeException(TimerReport::class.' expected '.typeOf($report).' given');
26 26
     }
27 27
 
28 28
     /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Tools/Reports/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.
src/Tools/Reports/Formatters/SimpleCounterReportFormatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
66 66
     {
67 67
         return
68 68
             sprintf(
69
-                self::FORWARD . '%s ',
69
+                self::FORWARD.'%s ',
70 70
                 $report->getBumped()
71 71
             );
72 72
     }
Please login to merge, or discard this patch.
src/Tools/Reports/Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,6 +168,6 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
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
@@ -29,7 +29,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.