Passed
Push — feature-FRAM-47-bench ( 315ed6 )
by Vincent
19:59
created
bench/TypeBench.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime;
4 4
 
5
-require_once __DIR__ . '/_files/BenchData.php';
5
+require_once __DIR__.'/_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\EntityArrayOf;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             $entities[] = new EntityNotTypedArray([
71 71
                 'floats'   => $this->randArray('double', self::SCALAR_COUNT),
72 72
                 'booleans' => $this->randArray('boolean', self::SCALAR_COUNT),
73
-                'dates'    => array_map(function (\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)),
73
+                'dates'    => array_map(function(\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)),
74 74
             ]);
75 75
         }
76 76
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         foreach ($this->notTypedRepository->all() as $entity) {
106 106
             $entity->booleans = array_map('boolval', $entity->booleans);
107 107
             $entity->floats = array_map('doubleval', $entity->floats);
108
-            $entity->dates = array_map(function ($str) { return \DateTime::createFromFormat(\DateTime::ISO8601, $str); }, $entity->dates);
108
+            $entity->dates = array_map(function($str) { return \DateTime::createFromFormat(\DateTime::ISO8601, $str); }, $entity->dates);
109 109
         }
110 110
     }
111 111
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             new EntityNotTypedArray([
133 133
                 'floats'   => $this->randArray('double', self::SCALAR_COUNT),
134 134
                 'booleans' => $this->randArray('boolean', self::SCALAR_COUNT),
135
-                'dates'    => array_map(function (\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)),
135
+                'dates'    => array_map(function(\DateTime $dateTime) { return $dateTime->format(\DateTime::ISO8601); }, $this->randArray('datetime', self::DATEIME_COUNT)),
136 136
             ])
137 137
         );
138 138
     }
Please login to merge, or discard this patch.
bench/Query/BulkOperationBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime\Query;
4 4
 
5
-require_once __DIR__ . '/../_files/BenchData.php';
5
+require_once __DIR__.'/../_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User;
Please login to merge, or discard this patch.
bench/Query/JoinBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime\Query;
4 4
 
5
-require_once __DIR__ . '/../_files/BenchData.php';
5
+require_once __DIR__.'/../_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User as BenchUser;
Please login to merge, or discard this patch.
bench/Query/CustomQueriesBench.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime\Query;
4 4
 
5
-require_once __DIR__ . '/../_files/BenchData.php';
5
+require_once __DIR__.'/../_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User;
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      */
209 209
     public function bench_insert_transaction()
210 210
     {
211
-        $this->repository->transaction(function () {
211
+        $this->repository->transaction(function() {
212 212
             /** @var BulkInsertQuery $insert */
213 213
             $insert = $this->repository->queries()->make(BulkInsertQuery::class);
214 214
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     public function bench_insert_builder()
234 234
     {
235
-        $this->repository->transaction(function () {
235
+        $this->repository->transaction(function() {
236 236
             for ($i = 0; $i < 100; ++$i) {
237 237
                 $this->repository->builder()->insert([
238 238
                     'id'          => 6000000 + $i,
Please login to merge, or discard this patch.
bench/PrimeBench.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime;
4 4
 
5
-require_once __DIR__ . '/_files/BenchData.php';
5
+require_once __DIR__.'/_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User as BenchUser;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 }
116 116
 
117 117
 function convert($size) {
118
-    return number_format($size/1024).' kb';
118
+    return number_format($size / 1024).' kb';
119 119
 }
120 120
 
121 121
 function profile($callback, $times) {
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
     
136 136
     $delta = ($end - $start);
137 137
     
138
-    $bench['time'] =  $delta;
139
-    $bench['queries'] =  $times / $delta;
140
-    $bench['memory'] =  memory_get_usage(true) - $memory;
138
+    $bench['time'] = $delta;
139
+    $bench['queries'] = $times / $delta;
140
+    $bench['memory'] = memory_get_usage(true) - $memory;
141 141
     
142 142
     return $bench;
143 143
 }
144 144
\ No newline at end of file
Please login to merge, or discard this patch.
bench/Query/QueryWrapAsBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime\Query;
4 4
 
5
-require_once __DIR__ . '/../_files/BenchData.php';
5
+require_once __DIR__.'/../_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User;
Please login to merge, or discard this patch.
bench/Query/CompilerBench.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace Bdf\Prime\Query;
4 4
 
5
-require_once __DIR__ . '/../_files/BenchData.php';
5
+require_once __DIR__.'/../_files/BenchData.php';
6 6
 
7 7
 use Bdf\Prime\Bench\BenchData;
8 8
 use Bdf\Prime\Bench\User;
Please login to merge, or discard this patch.