Passed
Branch master (cf3815)
by Shiyu
03:20 queued 20s
created
Category
src/Connectors/MySQL.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         $this->named = $named;
115 115
         $this->timeout = $timeout ?? new Timeouts;
116 116
 
117
-        ($this->link = new SWMySQL)->on('close', function () {
117
+        ($this->link = new SWMySQL)->on('close', function() {
118 118
             $this->closed()->resolve();
119 119
         });
120 120
     }
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function connect() : Promised
142 142
     {
143
-        return new Promise(function (Promised $promise) {
144
-            $this->link->connect($this->options(), static function (SWMySQL $db, bool $success) use ($promise) {
143
+        return new Promise(function(Promised $promise) {
144
+            $this->link->connect($this->options(), static function(SWMySQL $db, bool $success) use ($promise) {
145 145
                 $success
146 146
                     ? $promise->resolve()
147 147
                     : $promise->throw(new ConnectingException($db->connect_error, $db->connect_errno))
@@ -155,8 +155,8 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function heartbeat() : Promised
157 157
     {
158
-        return new Promise(function (Promised $promised) {
159
-            $this->link->query('SELECT 1', function (SWMySQL $db, $result) use ($promised) {
158
+        return new Promise(function(Promised $promised) {
159
+            $this->link->query('SELECT 1', function(SWMySQL $db, $result) use ($promised) {
160 160
                 (is_array($result) && count($result) === 1)
161 161
                     ? $promised->resolve()
162 162
                     : $promised->reject()
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
             $sql = $this->binding($sql, $bind);
195 195
         }
196 196
 
197
-        $executor = function ($fn) use ($sql) {
197
+        $executor = function($fn) use ($sql) {
198 198
             if (false === $this->link->query($sql, $fn)) {
199 199
                 throw new UplinkException('Unknown failure');
200 200
             }
201 201
         };
202 202
 
203
-        $receiver = function (SWMySQL $db, $result) use ($sql) {
203
+        $receiver = function(SWMySQL $db, $result) use ($sql) {
204 204
             if (is_bool($result)) {
205 205
                 if ($result) {
206 206
                     if ($db->insert_id) {
@@ -276,13 +276,13 @@  discard block
 block discarded – undo
276 276
             EXT::REMOTE_ENDPOINT => new Endpoint($this->named),
277 277
         ]);
278 278
 
279
-        $executor = function ($fn) use ($func) {
279
+        $executor = function($fn) use ($func) {
280 280
             if (false === $this->link->$func($fn)) {
281 281
                 throw new UplinkException('Unknown failure');
282 282
             }
283 283
         };
284 284
 
285
-        $receiver = static function (SWMySQL $db, bool $result) {
285
+        $receiver = static function(SWMySQL $db, bool $result) {
286 286
             if ($result) {
287 287
                 return;
288 288
             } else {
Please login to merge, or discard this patch.
src/Chips/ParamsBind.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
     protected function binding(string $sql, array $params) : string
24 24
     {
25 25
         // sort by key length (make correct of ":test,:test2")
26
-        uksort($params, static function ($a, $b) {
26
+        uksort($params, static function($a, $b) {
27 27
             return strlen($b) - strlen($a);
28 28
         });
29 29
 
Please login to merge, or discard this patch.
src/Chips/TransactionGuard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
         $rollback = Promise::deferred();
41 41
 
42 42
         // automatic release after commit
43
-        $commit->then(static function () use ($link) {
43
+        $commit->then(static function() use ($link) {
44 44
             $link->release();
45 45
         });
46 46
 
47 47
         // automatic release after rollback
48
-        $rollback->then(static function () use ($link) {
48
+        $rollback->then(static function() use ($link) {
49 49
             $link->release();
50 50
         });
51 51
 
Please login to merge, or discard this patch.
src/Clusters/MySQL.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             $dsn->option('execute', $this->timeout)
79 79
         );
80 80
 
81
-        return new Pool($this->options($endpoint), static function () use ($timeouts, $dsn, $vid) {
81
+        return new Pool($this->options($endpoint), static function() use ($timeouts, $dsn, $vid) {
82 82
             return new Connector(
83 83
                 $dsn->host(),
84 84
                 $dsn->port() ?: 3306,
Please login to merge, or discard this patch.