Passed
Push — develop ( 0a2c3f...8e5858 )
by Alec
03:05
created
src/Tools/Reports/Formatters/BenchmarkFunctionFormatter.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/TimerReportFormatter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -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/BenchmarkReportFormatter.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
     protected function build(BenchmarkReport $report): string
46 46
     {
47 47
         $this->report = $report;
48
-        $str = 'Results:' . PHP_EOL;
48
+        $str = 'Results:'.PHP_EOL;
49 49
         $this->computeVariables();
50 50
         if ($this->benchmarkedAny) {
51
-            $str .= self::BENCHMARK . PHP_EOL;
51
+            $str .= self::BENCHMARK.PHP_EOL;
52 52
         }
53 53
         /** @var BenchmarkFunction $function */
54 54
         foreach ($report->getFunctions() as $name => $function) {
@@ -120,8 +120,7 @@  discard block
 block discarded – undo
120 120
                     '%s%s%s',
121 121
                     $aRAE,
122 122
                     $this->benchmarkedMoreThanOne && $this->report->isShowReturns() ?
123
-                        ':' . PHP_EOL . BenchmarkFunctionFormatter::returnToString($this->lastReturn) :
124
-                        $dLM,
123
+                        ':'.PHP_EOL.BenchmarkFunctionFormatter::returnToString($this->lastReturn) : $dLM,
125 124
                     PHP_EOL
126 125
                 );
127 126
         }
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/ReportFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     protected function wrongReportType(string $expected, ReportInterface $report): void
21 21
     {
22 22
         throw new \RuntimeException(
23
-            'Instance of [' . $expected . '] expected, [' . typeOf($report) . '] given.'
23
+            'Instance of ['.$expected.'] expected, ['.typeOf($report).'] given.'
24 24
         );
25 25
     }
26 26
 }
Please login to merge, or discard this patch.
src/Tools/Benchmark.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->iterations = $this->refineIterations($iterations);
57 57
 
58 58
         $this->iterationNumberGenerator =
59
-            function (int $iterations, int $i = 1): \Generator {
59
+            function(int $iterations, int $i = 1): \Generator {
60 60
                 while ($i <= $iterations) {
61 61
                     yield $i++;
62 62
                 }
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
     {
81 81
         if ($iterations < self::MIN_ITERATIONS) {
82 82
             throw new \RuntimeException(
83
-                __CLASS__ .
84
-                ': Number of Iterations should be greater then ' .
83
+                __CLASS__.
84
+                ': Number of Iterations should be greater then '.
85 85
                 self::MIN_ITERATIONS
86 86
             );
87 87
         }
Please login to merge, or discard this patch.