Passed
Push — master ( 82a6d6...1c12ad )
by Alec
03:13
created
src/Tools/Reports/Formatters/TimerReportFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function full(): string
56 56
     {
57
-        $name =  $this->report->getName();
57
+        $name = $this->report->getName();
58 58
         try {
59 59
             $str = sprintf(
60
-                'Timer[%s]: Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s' . PHP_EOL,
60
+                'Timer[%s]: Average: %s, Last: %s, Min(%s): %s, Max(%s): %s, Count: %s'.PHP_EOL,
61 61
                 $this->theme->info($name),
62 62
                 $this->theme->comment(format_time_auto($this->report->getAverageValue())),
63 63
                 format_time_auto($this->report->getLastValue()),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         } catch (\Throwable $e) {
71 71
             $str =
72 72
                 sprintf(
73
-                    'Timer[%s]: %s' . PHP_EOL,
73
+                    'Timer[%s]: %s'.PHP_EOL,
74 74
                     $this->theme->red($name),
75 75
                     $this->theme->comment('Exception encountered')
76 76
                 );
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
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     public function getString(): string
31 31
     {
32 32
         $profilerReport = (string)$this->report->getProfiler()->getReport();
33
-        $r = 'Benchmark:' . PHP_EOL;
33
+        $r = 'Benchmark:'.PHP_EOL;
34 34
         /** @var BenchmarkRelative $result */
35 35
         foreach ($this->report->getRelatives() as $indexName => $result) {
36 36
             $relative = $result->getRelative();
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
             );
55 55
             if ($this->report->isWithResults()) {
56 56
                 $result = $function->getResult();
57
-                $r .= $this->theme->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "'
58
-                        . var_export($function->getResult(), true) . '" ') . PHP_EOL;
57
+                $r .= $this->theme->dark('return: '.str_replace('double', 'float', typeOf($result)).' "'
58
+                        . var_export($function->getResult(), true).'" ').PHP_EOL;
59 59
             }
60 60
         }
61 61
         if (!empty($exceptionMessages = $this->report->getExceptionMessages())) {
62
-            $r .= 'Exceptions:' . PHP_EOL;
62
+            $r .= 'Exceptions:'.PHP_EOL;
63 63
             foreach ($exceptionMessages as $name => $exceptionMessage) {
64
-                $r .= brackets($name) . ': ' . $this->theme->red($exceptionMessage) . PHP_EOL;
64
+                $r .= brackets($name).': '.$this->theme->red($exceptionMessage).PHP_EOL;
65 65
             }
66 66
         }
67 67
         return
68
-            $r . PHP_EOL . $profilerReport;
68
+            $r.PHP_EOL.$profilerReport;
69 69
     }
70 70
 
71 71
     /**
@@ -91,6 +91,6 @@  discard block
 block discarded – undo
91 91
     private function percent(float $relative): string
92 92
     {
93 93
         return
94
-            number_format($relative * 100, 1) . '%';
94
+            number_format($relative * 100, 1).'%';
95 95
     }
96 96
 }
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
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $this->errorState = false;
59 59
         $this->rewindable =
60 60
             new Rewindable(
61
-                function (int $iterations, int $i = 1): \Generator {
61
+                function(int $iterations, int $i = 1): \Generator {
62 62
                     while ($i <= $iterations) {
63 63
                         yield $i++;
64 64
                     }
@@ -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
             $this->exceptions[$f->getIndexedName()] = $e;
133 133
         }
Please login to merge, or discard this patch.