Completed
Push — master ( 0b3013...288985 )
by Ryosuke
04:35 queued 01:25
created
examples/localhost/server.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,8 +55,9 @@  discard block
 block discarded – undo
55 55
         $con = @stream_socket_accept($socket, -1);
56 56
         if (!$con) {
57 57
             $err = error_get_last(); // どーなんだこれ strerror(EINTR)
58
-            if (strpos($err["message"], "Interrupted system call") !== false)
59
-                continue;
58
+            if (strpos($err["message"], "Interrupted system call") !== false) {
59
+                            continue;
60
+            }
60 61
             fwrite(STDERR, "[Server] " . $err["message"] . "\n");
61 62
             exit(1);
62 63
         }
@@ -91,7 +92,9 @@  discard block
 block discarded – undo
91 92
         parse_str(isset($parsed['query']) ? $parsed['query'] : '', $q);
92 93
         foreach ($endpoints as $endpoint => $action) {
93 94
             if ($parsed['path'] === $endpoint || $endpoint === '') {
94
-                if ($endpoint === '') $endpoint = '[Undefined]';
95
+                if ($endpoint === '') {
96
+                    $endpoint = '[Undefined]';
97
+                }
95 98
                 fwrite(STDERR, "Request: $parts[1]\n");
96 99
                 $action($con, $q);
97 100
                 exit(0);
Please login to merge, or discard this patch.
src/Co.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -323,8 +323,10 @@
 block discarded – undo
323 323
             // NOTE: DO NOT call curl_multi_remove_handle
324 324
             //       or curl_multi_add_handle while looping curl_multi_info_read!
325 325
             $entries = array();
326
-            do if ($entry = curl_multi_info_read($this->mh, $remains)) {
326
+            do {
327
+                if ($entry = curl_multi_info_read($this->mh, $remains)) {
327 328
                 $entries[] = $entry;
329
+            }
328 330
             } while ($remains);
329 331
             // Remove done and consume queue.
330 332
             foreach ($entries as $entry) {
Please login to merge, or discard this patch.