Completed
Push — master ( 75a4bf...99f4b4 )
by BENOIT
03:23
created
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.