Completed
Push — master ( 99f4b4...cbe57b )
by BENOIT
06:36
created
src/Model/Adapter/Mysqli/Statement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
             return $this->queryString;
164 164
         }
165 165
 
166
-        $escape = function ($value) {
166
+        $escape = function($value) {
167 167
             if (null === $value) {
168 168
                 return 'NULL';
169 169
             }
Please login to merge, or discard this patch.
src/Model/Adapter/Mysqli/MysqliAsync.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public static function query(string $query, mysqli $cnx)
34 34
     {
35
-        $promise = new Promise(function () {
35
+        $promise = new Promise(function() {
36 36
             self::getInstance()->wait();
37 37
         });
38 38
         $cnx->query($query, MYSQLI_ASYNC);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             }
119 119
             foreach ($this->queries as $l => $link) {
120 120
                 $promise = $this->getPromise($link);
121
-                $cnx    = $this->getConnection($link);
121
+                $cnx = $this->getConnection($link);
122 122
                 try {
123 123
                     $result = $cnx->reap_async_query();
124 124
                     if ($result instanceof mysqli_result) {
Please login to merge, or discard this patch.
src/Model/Adapter/PDO/Statement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
             return $this->stmt->queryString;
157 157
         }
158 158
 
159
-        $escape = function ($value) {
159
+        $escape = function($value) {
160 160
             if (null === $value) {
161 161
                 return 'NULL';
162 162
             }
Please login to merge, or discard this patch.
src/Model/Adapter/PDO/PDOAdapter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         }
53 53
         $this->credentials = $credentials;
54 54
         if (null !== $options) {
55
-            $this->options     = array_replace($this->getDefaultOptions(), $options);
55
+            $this->options = array_replace($this->getDefaultOptions(), $options);
56 56
         }
57 57
     }
58 58
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     public function isConnected(): bool
79 79
     {
80 80
         try {
81
-            self::wrapWithErrorHandler(function () {
81
+            self::wrapWithErrorHandler(function() {
82 82
                 $this->cnx->getAttribute(PDO::ATTR_SERVER_INFO);
83 83
             });
84 84
             return true;
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      */
170 170
     public function executeAsync($stmt, array $values = null): PromiseInterface
171 171
     {
172
-        $promise = new Promise(function () use (&$promise, $stmt, $values) {
172
+        $promise = new Promise(function() use (&$promise, $stmt, $values) {
173 173
             try {
174 174
                 $promise->resolve($this->execute($stmt, $values));
175 175
             } catch (DBALException $e) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $wrappedStmt = $stmt->getWrappedStatement();
188 188
         try {
189
-            self::wrapWithErrorHandler(function () use ($stmt, $wrappedStmt) {
189
+            self::wrapWithErrorHandler(function() use ($stmt, $wrappedStmt) {
190 190
                 $stmt->bind();
191 191
                 $wrappedStmt->execute();
192 192
             });
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     private static function wrapWithErrorHandler(callable $run)
275 275
     {
276
-        $errorHandler = function ($errno, $errstr) {
276
+        $errorHandler = function($errno, $errstr) {
277 277
             throw new PDOException($errstr, $errno);
278 278
         };
279 279
         set_error_handler($errorHandler, E_WARNING);
Please login to merge, or discard this patch.
src/Model/Adapter/Mysqli/MysqliAdapter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         $this->cnx         = $cnx;
57 57
         $this->credentials = $credentials;
58 58
         if (null !== $options) {
59
-            $this->options     = array_replace($this->getDefaultOptions(), $options);
59
+            $this->options = array_replace($this->getDefaultOptions(), $options);
60 60
             if ($this->hasOption('charset')) {
61 61
                 $this->cnx->set_charset($this->getOption('charset'));
62 62
             }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         }
144 144
 
145 145
         try {
146
-            $wrappedStmt = self::wrapWithErrorHandler(function () use ($runnableQueryString) {
146
+            $wrappedStmt = self::wrapWithErrorHandler(function() use ($runnableQueryString) {
147 147
                 return $this->cnx->prepare($runnableQueryString);
148 148
             });
149 149
         } catch (mysqli_sql_exception $e) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             return $this->executeParallel($stmt, $values);
207 207
         }
208 208
 
209
-        $promise = new Promise(function () use (&$promise, $stmt, $values) {
209
+        $promise = new Promise(function() use (&$promise, $stmt, $values) {
210 210
             try {
211 211
                 $promise->resolve($this->execute($stmt, $values));
212 212
             } catch (Throwable $e) {
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         }
251 251
 
252 252
         $stmt->bind();
253
-        $promise = MysqliAsync::query($stmt->getRunnableQuery(), $cnx)->then(function ($result) use ($cnx, $stmt) {
253
+        $promise = MysqliAsync::query($stmt->getRunnableQuery(), $cnx)->then(function($result) use ($cnx, $stmt) {
254 254
             if (!$result instanceof mysqli_result) {
255 255
                 $result = null;
256 256
             }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
     private function runStmt(Statement $stmt)
264 264
     {
265 265
         try {
266
-            return self::wrapWithErrorHandler(function () use ($stmt) {
266
+            return self::wrapWithErrorHandler(function() use ($stmt) {
267 267
                 return $stmt->createResult();
268 268
             });
269 269
         } catch (mysqli_sql_exception $e) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     private static function wrapWithErrorHandler(callable $run)
360 360
     {
361
-        $errorHandler = function ($errno, $errstr) {
361
+        $errorHandler = function($errno, $errstr) {
362 362
             throw new mysqli_sql_exception($errstr, $errno);
363 363
         };
364 364
         set_error_handler($errorHandler, E_WARNING);
Please login to merge, or discard this patch.
src/Model/Adapter/Mysqli/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
                     $this->resetResultset();
131 131
                 }
132 132
 
133
-                $generator = function (\mysqli_result $result) {
133
+                $generator = function(\mysqli_result $result) {
134 134
                     while ($row = $result->fetch_array(MYSQLI_NUM)) {
135 135
                         yield $row[0];
136 136
                     }
Please login to merge, or discard this patch.
src/Model/Adapter/PDO/Result.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
                     $this->resetResultset();
128 128
                 }
129 129
 
130
-                $generator = function (\PDOStatement $stmt) {
130
+                $generator = function(\PDOStatement $stmt) {
131 131
                     while ($value = $stmt->fetchColumn(0)) {
132 132
                         yield $value;
133 133
                     }
Please login to merge, or discard this patch.