Completed
Push — master ( 06aa7a...da8481 )
by Ryosuke
13:38
created
src/Internal/CoOption.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     public function offsetGet($offset)
89 89
     {
90 90
         if (!isset($this->options[$offset])) {
91
-            throw new \DomainException('Undefined field: ' + $offset);
91
+            throw new \DomainException('Undefined field: ' +$offset);
92 92
         }
93 93
         return $this->options[$offset];
94 94
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             if (!isset(self::$types[$key])) {
126 126
                 throw new \InvalidArgumentException("Unknown option: $key");
127 127
             }
128
-            $validator = [__CLASS__, 'validate' . self::$types[$key]];
128
+            $validator = [__CLASS__, 'validate'.self::$types[$key]];
129 129
             $options[$key] = $validator($key, $value);
130 130
         }
131 131
         return $options;
Please login to merge, or discard this patch.
src/Internal/ManualScheduler.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 require __DIR__ . '/../vendor/autoload.php';
4 4
 
5 5
 use mpyw\Co\Co;
6
-use mpyw\Co\CURLException;
7 6
 
8 7
 function curl_init_with($url, array $options = [CURLOPT_RETURNTRANSFER => true]) {
9 8
     $ch = curl_init($url);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
         $errno = curl_multi_add_handle($this->mh, $ch);
70 70
         if ($errno !== CURLM_OK) {
71
-            $msg = curl_multi_strerror($errno) . ": $ch";
71
+            $msg = curl_multi_strerror($errno).": $ch";
72 72
             $deferred->reject(new \RuntimeException($msg));
73 73
             return;
74 74
         }
Please login to merge, or discard this patch.
src/Internal/AutoScheduler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         }
69 69
         $errno = curl_multi_add_handle($this->mh, $ch);
70 70
         if ($errno !== CURLM_OK) {
71
-            $msg = curl_multi_strerror($errno) . ": $ch";
71
+            $msg = curl_multi_strerror($errno).": $ch";
72 72
             $deferred->reject(new \RuntimeException($msg));
73 73
             return;
74 74
         }
Please login to merge, or discard this patch.
src/AllFailedException.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
      * Constructor.
11 11
      * @param string   $message Dummy.
12 12
      * @param int      $code    Dummy.
13
-     * @param mixed    $value   Value to be retrived.
14 13
      */
15 14
     public function __construct($message, $code, $reasons)
16 15
     {
Please login to merge, or discard this patch.
src/Internal/ControlUtils.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 namespace mpyw\Co\Internal;
4
-use mpyw\RuntimePromise\Deferred;
5 4
 use mpyw\Co\AllFailedException;
6 5
 use mpyw\Co\CoInterface;
7 6
 
Please login to merge, or discard this patch.
src/Co.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 YieldableUtils::getApplier($returned, $yieldables, [$deferred, 'resolve']),
167 167
                 [$deferred, 'reject']
168 168
             )
169
-            ->always(function () use ($yieldables) {
169
+            ->always(function() use ($yieldables) {
170 170
                 $this->runners = array_diff_key($this->runners, $yieldables);
171 171
             });
172 172
             return;
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
             $this->pool->addDelay($gc->current(), $dfd);
190 190
             $dfd
191 191
             ->promise()
192
-            ->then(function () use ($gc) {
192
+            ->then(function() use ($gc) {
193 193
                 $gc->send(null);
194 194
             })
195
-            ->always(function () use ($gc, $deferred) {
195
+            ->always(function() use ($gc, $deferred) {
196 196
                 $this->processGeneratorContainer($gc, $deferred);
197 197
             });
198 198
             return;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         ->then(
216 216
             YieldableUtils::getApplier($yielded, $yieldables, [$gc, 'send']),
217 217
             [$gc, 'throw_']
218
-        )->always(function () use ($gc, $deferred, $yieldables) {
218
+        )->always(function() use ($gc, $deferred, $yieldables) {
219 219
             // Continue
220 220
             $this->runners = array_diff_key($this->runners, $yieldables);
221 221
             $this->processGeneratorContainer($gc, $deferred);
Please login to merge, or discard this patch.
src/Internal/YieldableUtils.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public static function getApplier($yielded, array $yieldables, callable $next = null)
75 75
     {
76
-        return function (array $results) use ($yielded, $yieldables, $next) {
76
+        return function(array $results) use ($yielded, $yieldables, $next) {
77 77
             foreach ($results as $hash => $resolved) {
78 78
                 $current = &$yielded;
79 79
                 foreach ($yieldables[$hash]['keylist'] as $key) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     public static function safeDeferred(Deferred $original_dfd)
95 95
     {
96 96
         $dfd = new Deferred;
97
-        $absorber = function ($any) use ($original_dfd) {
97
+        $absorber = function($any) use ($original_dfd) {
98 98
             $original_dfd->resolve($any);
99 99
         };
100 100
         $dfd->promise()->then($absorber, $absorber);
Please login to merge, or discard this patch.