Completed
Push — develop ( b733eb...69cb61 )
by Alec
06:31
created
src/Tools/Reports/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             return
51 51
                 new BenchmarkReport($reportable);
52 52
         }
53
-        throw new \RuntimeException('Attempt to create unimplemented report for: ' . typeOf($reportable));
53
+        throw new \RuntimeException('Attempt to create unimplemented report for: '.typeOf($reportable));
54 54
     }
55 55
 
56 56
     /**
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             return
76 76
                 new BenchmarkReportFormatter($report);
77 77
         }
78
-        throw new \RuntimeException('Attempt to create unimplemented formatter for: ' . typeOf($report));
78
+        throw new \RuntimeException('Attempt to create unimplemented formatter for: '.typeOf($report));
79 79
     }
80 80
 
81 81
     /**
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/BenchmarkReportFormatter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     public function getString(): string
30 30
     {
31 31
         $profilerReport = (string)$this->report->getProfiler()->getReport();
32
-        $r = 'Benchmark:' . PHP_EOL;
32
+        $r = 'Benchmark:'.PHP_EOL;
33 33
         foreach ($this->report->getRelatives() as $indexName => $result) {
34 34
             [$relative, $average] = $result;
35 35
             $function = $this->report->getFunctionObject($indexName);
@@ -51,18 +51,18 @@  discard block
 block discarded – undo
51 51
             );
52 52
             if ($this->report->isWithResults()) {
53 53
                 $result = $function->getResult();
54
-                $r .= $this->theme->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "'
55
-                        . var_export($function->getResult(), true) . '" ') . PHP_EOL;
54
+                $r .= $this->theme->dark('return: '.str_replace('double', 'float', typeOf($result)).' "'
55
+                        . var_export($function->getResult(), true).'" ').PHP_EOL;
56 56
             }
57 57
         }
58 58
         if (!empty($exceptionMessages = $this->report->getExceptionMessages())) {
59
-            $r .= 'Exceptions:' . PHP_EOL;
59
+            $r .= 'Exceptions:'.PHP_EOL;
60 60
             foreach ($exceptionMessages as $name => $exceptionMessage) {
61
-                $r .= brackets($name) . ': ' . $this->theme->red($exceptionMessage) . PHP_EOL;
61
+                $r .= brackets($name).': '.$this->theme->red($exceptionMessage).PHP_EOL;
62 62
             }
63 63
         }
64 64
         return
65
-            $r . PHP_EOL . $profilerReport;
65
+            $r.PHP_EOL.$profilerReport;
66 66
     }
67 67
 
68 68
     /**
@@ -88,6 +88,6 @@  discard block
 block discarded – undo
88 88
     private function percent(float $relative): string
89 89
     {
90 90
         return
91
-            number_format($relative * 100, 1) . '%';
91
+            number_format($relative * 100, 1).'%';
92 92
     }
93 93
 }
Please login to merge, or discard this patch.
src/Tools/Benchmark.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->functions = [];
57 57
         $this->rewindable =
58 58
             new Rewindable(
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
                     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $result = $function(...$args);
128 128
         } catch (\Throwable $e) {
129 129
             $this->errorState = true;
130
-            $result = brackets(typeOf($e)) . ': ' . $e->getMessage();
130
+            $result = brackets(typeOf($e)).': '.$e->getMessage();
131 131
             $this->exceptionMessages[$f->getIndexedName()] = $result;
132 132
         }
133 133
         $f->setResult($result);
Please login to merge, or discard this patch.