Passed
Push — master ( 7b8b0a...7a00fa )
by Alec
02:15
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/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->themed->info($name),
62 62
                 $this->themed->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->themed->red($name),
75 75
                     $this->themed->comment('Exception encountered')
76 76
                 );
Please login to merge, or discard this patch.
src/Tools/Internal/BenchmarkFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
     public function enumeratedName(): string
103 103
     {
104 104
         return
105
-            brackets((string)$this->index, BRACKETS_ANGLE) . ' ' . $this->name;
105
+            brackets((string)$this->index, BRACKETS_ANGLE).' '.$this->name;
106 106
     }
107 107
 
108 108
     /**
Please login to merge, or discard this patch.
src/Tools/Benchmark.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->verbose = false;
63 63
         $this->rewindable =
64 64
             new Rewindable(
65
-                function (int $iterations, int $i = 1): \Generator {
65
+                function(int $iterations, int $i = 1): \Generator {
66 66
                     while ($i <= $iterations) {
67 67
                         yield $i++;
68 68
                     }
@@ -93,8 +93,8 @@  discard block
 block discarded – undo
93 93
 
94 94
         if ($this->verbose) {
95 95
             $this->erase();
96
-            echo ' 100%' . PHP_EOL;
97
-            echo '  λ   Done!' . PHP_EOL;
96
+            echo ' 100%'.PHP_EOL;
97
+            echo '  λ   Done!'.PHP_EOL;
98 98
         }
99 99
 
100 100
         if ($printReport) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         try {
138 138
             $result = $function(...$args);
139 139
         } catch (\Throwable $e) {
140
-            $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)) . ': ' . $e->getMessage();
140
+            $this->exceptionMessages[$f->getIndexedName()] = $result = brackets(typeOf($e)).': '.$e->getMessage();
141 141
             $this->exceptions[$f->getIndexedName()] = $e;
142 142
             $f->setException($e);
143 143
         }
Please login to merge, or discard this patch.
src/Tools/Reports/BenchmarkReport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $timers = [];
112 112
         /** @var BenchmarkFunction $f */
113 113
         foreach ($this->functions as $f) {
114
-            $timers[]=$f->getTimer();
114
+            $timers[] = $f->getTimer();
115 115
         }
116 116
         return $timers;
117 117
     }
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/BenchmarkReportFormatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         $rank = 0;
29 29
         $profilerReport = (string)$this->report->getProfiler()->getReport();
30
-        $r = 'Benchmark:' . PHP_EOL;
30
+        $r = 'Benchmark:'.PHP_EOL;
31 31
         /** @var BenchmarkRelative $result */
32 32
         foreach ($this->report->getRelatives() as $indexName => $result) {
33 33
             $relative = $result->getRelative();
@@ -68,18 +68,18 @@  discard block
 block discarded – undo
68 68
             );
69 69
             if ($this->report->isWithResults()) {
70 70
                 $result = $function->getResult();
71
-                $r .= $this->themed->dark('return: ' . str_replace('double', 'float', typeOf($result)) . ' "'
72
-                        . var_export($function->getResult(), true) . '" ') . PHP_EOL;
71
+                $r .= $this->themed->dark('return: '.str_replace('double', 'float', typeOf($result)).' "'
72
+                        . var_export($function->getResult(), true).'" ').PHP_EOL;
73 73
             }
74 74
         }
75 75
         if (!empty($exceptionMessages = $this->report->getExceptionMessages())) {
76
-            $r .= 'Exceptions:' . PHP_EOL;
76
+            $r .= 'Exceptions:'.PHP_EOL;
77 77
             foreach ($exceptionMessages as $name => $exceptionMessage) {
78
-                $r .= brackets($name) . ': ' . $this->themed->red($exceptionMessage) . PHP_EOL;
78
+                $r .= brackets($name).': '.$this->themed->red($exceptionMessage).PHP_EOL;
79 79
             }
80 80
         }
81 81
         return
82
-            $r . PHP_EOL . $profilerReport;
82
+            $r.PHP_EOL.$profilerReport;
83 83
     }
84 84
 
85 85
     /**
Please login to merge, or discard this patch.
src/Tools/Reports/Formatters/Helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,6 +15,6 @@
 block discarded – undo
15 15
     {
16 16
         $prefix = $prefix ?? '';
17 17
         return
18
-            $prefix . number_format($relative * 100, 1) . '%';
18
+            $prefix.number_format($relative * 100, 1).'%';
19 19
     }
20 20
 }
Please login to merge, or discard this patch.