Passed
Push — master ( 5c7bad...ea47a1 )
by Alec
03:06
created
src/Tools/Benchmark.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $this->iterations = $iterations;
42 42
         $this->rewindable =
43 43
             new Rewindable(
44
-                function (int $iterations, int $i = 1): \Generator {
44
+                function(int $iterations, int $i = 1): \Generator {
45 45
                     while ($i <= $iterations) {
46 46
                         yield $i++;
47 47
                     }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             $result = \call_user_func($function, ...$args);
120 120
         } catch (\Throwable $e) {
121 121
             $this->errorState = true;
122
-            $result = brackets(typeOf($e)) . ': ' . $e->getMessage();
122
+            $result = brackets(typeOf($e)).': '.$e->getMessage();
123 123
             $this->exceptionMessages[$f->getIndexedName()] = $result;
124 124
         }
125 125
         $f->setResult($result);
Please login to merge, or discard this patch.
src/Tools/Reports/BenchmarkReport.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function __toString(): string
42 42
     {
43 43
         $profilerReport = (string)$this->getProfiler()->getReport();
44
-        $r = 'Benchmark:' . PHP_EOL;
44
+        $r = 'Benchmark:'.PHP_EOL;
45 45
         foreach ($this->computeRelatives() as $indexName => $result) {
46 46
             $function = $this->getFunctionObject($indexName);
47 47
             $arguments = $function->getArgs();
@@ -60,17 +60,17 @@  discard block
 block discarded – undo
60 60
                 PHP_EOL
61 61
             );
62 62
             if ($this->withResults) {
63
-                $r .= var_export($function->getResult(), true) . PHP_EOL;
63
+                $r .= var_export($function->getResult(), true).PHP_EOL;
64 64
             }
65 65
         }
66 66
         if (!empty($this->exceptionMessages)) {
67
-            $r .= 'Exceptions:'. PHP_EOL;
67
+            $r .= 'Exceptions:'.PHP_EOL;
68 68
             foreach ($this->exceptionMessages as $name => $exceptionMessage) {
69
-                $r .= brackets($name). ': '. $exceptionMessage . PHP_EOL;
69
+                $r .= brackets($name).': '.$exceptionMessage.PHP_EOL;
70 70
             }
71 71
         }
72 72
         return
73
-            $r . PHP_EOL . $profilerReport;
73
+            $r.PHP_EOL.$profilerReport;
74 74
     }
75 75
 
76 76
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         foreach ($relatives as $name => $relative) {
94 94
             $relatives[$name] =
95
-                $this->percent((float)$relative - 1) . ' ' .
95
+                $this->percent((float)$relative - 1).' '.
96 96
                 brackets(format_time($averages[$name]), BRACKETS_PARENTHESES);
97 97
         }
98 98
         return $relatives;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     private function percent(float $relative): string
122 122
     {
123 123
         return
124
-            number_format($relative * 100, 1) . '%';
124
+            number_format($relative * 100, 1).'%';
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.