Passed
Push — master ( c963cb...805845 )
by Eric
01:59
created
src/BenchInterface.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @param bool        $readable Whether the result must be human-readable.
43 43
      * @param null|string $format   The format to display (printf format).
44 44
      */
45
-    public function getMemoryPeak(bool $readable = false, null|string $format = null): int|string;
45
+    public function getMemoryPeak(bool $readable = false, null | string $format = null): int | string;
46 46
 
47 47
     /**
48 48
      * Returns the memory usage at the end checkpoint.
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @throws LogicException Should be thrown if end() and/or start() has not been called.
54 54
      *                        Can be checked with hasStarted() and hasEnded().
55 55
      */
56
-    public function getMemoryUsage(bool $readable = false, null|string $format = null): int|string;
56
+    public function getMemoryUsage(bool $readable = false, null | string $format = null): int | string;
57 57
 
58 58
     /**
59 59
      * Returns the elapsed time, readable or not.
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @throws LogicException Should be thrown if end() and/or start() has not been called.
65 65
      *                        Can be checked with hasStarted() and hasEnded().
66 66
      */
67
-    public function getTime(bool $readable = false, null|string $format = null): float|string;
67
+    public function getTime(bool $readable = false, null | string $format = null): float | string;
68 68
 
69 69
     /**
70 70
      * Checks if a bench has ended.
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param null|string $format  The format to display (printf format).
99 99
      * @param int         $round   Rounding precision (decimals).
100 100
      */
101
-    public static function readableElapsedTime(float $seconds, null|string $format = null, int $round = 3): string;
101
+    public static function readableElapsedTime(float $seconds, null | string $format = null, int $round = 3): string;
102 102
 
103 103
     /**
104 104
      * Returns a human-readable memory size.
@@ -107,5 +107,5 @@  discard block
 block discarded – undo
107 107
      * @param null|string $format The format to display (printf format).
108 108
      * @param int         $round  Rounding precision (decimals).
109 109
      */
110
-    public static function readableSize(int $size, null|string $format = null, int $round = 3): string;
110
+    public static function readableSize(int $size, null | string $format = null, int $round = 3): string;
111 111
 }
Please login to merge, or discard this patch.
src/Bench.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * @inheritDoc
71 71
      */
72
-    public function getMemoryPeak(bool $readable = false, null|string $format = null): int|string
72
+    public function getMemoryPeak(bool $readable = false, null | string $format = null): int | string
73 73
     {
74 74
         $memory = memory_get_peak_usage(true);
75 75
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * @inheritDoc
85 85
      */
86
-    public function getMemoryUsage(bool $readable = false, null|string $format = null): int|string
86
+    public function getMemoryUsage(bool $readable = false, null | string $format = null): int | string
87 87
     {
88 88
         if (!$this->hasStarted()) {
89 89
             throw new LogicException('Bench has not been started. Call start() first.');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * @inheritDoc
105 105
      */
106
-    public function getTime(bool $readable = false, null|string $format = null): float|string
106
+    public function getTime(bool $readable = false, null | string $format = null): float | string
107 107
     {
108 108
         if (!$this->hasStarted()) {
109 109
             throw new LogicException('Bench has not been started. Call start() first.');
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     /**
168 168
      * @inheritDoc
169 169
      */
170
-    public static function readableElapsedTime(float $seconds, null|string $format = null, int $round = 3): string
170
+    public static function readableElapsedTime(float $seconds, null | string $format = null, int $round = 3): string
171 171
     {
172 172
         $format ??= '%.3f%s';
173 173
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     /**
184 184
      * @inheritDoc
185 185
      */
186
-    public static function readableSize(int $size, null|string $format = null, int $round = 3): string
186
+    public static function readableSize(int $size, null | string $format = null, int $round = 3): string
187 187
     {
188 188
         /**
189 189
          * @psalm-var array<array-key, string> $units
Please login to merge, or discard this patch.