Passed
Branch master (c48747)
by Shiyu
03:24
created
Category
src/Stats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function proposed(Promised $ins) : void
51 51
     {
52
-        self::$pending ++;
52
+        self::$pending++;
53 53
         self::$observer && (self::$observer)(self::PROPOSED, $ins);
54 54
     }
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public static function confirmed(Promised $ins) : void
60 60
     {
61
-        self::$pending --;
61
+        self::$pending--;
62 62
         self::$observer && (self::$observer)(self::CONFIRMED, $ins);
63 63
     }
64 64
 }
Please login to merge, or discard this patch.
src/Stacked.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,6 +63,6 @@
 block discarded – undo
63 63
      */
64 64
     private static function next() : int
65 65
     {
66
-        return self::$sid ++ >= PHP_INT_MAX ? self::$sid = 1 : self::$sid;
66
+        return self::$sid++ >= PHP_INT_MAX ? self::$sid = 1 : self::$sid;
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
src/Promised.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      * @param callable $throwing
45 45
      * @return Promised
46 46
      */
47
-    public function catch(callable $throwing) : Promised;
47
+    public function catch (callable $throwing) : Promised;
48 48
 
49 49
     /**
50 50
      * @param mixed ...$args
Please login to merge, or discard this patch.
src/Features/Sync.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
      */
21 21
     public function sync(Promised $next) : Promised
22 22
     {
23
-        $this->then(static function (...$args) use ($next) {
23
+        $this->then(static function(...$args) use ($next) {
24 24
             $next->resolve(...$args);
25
-        }, static function (...$args) use ($next) {
25
+        }, static function(...$args) use ($next) {
26 26
             $next->reject(...$args);
27 27
         });
28 28
 
Please login to merge, or discard this patch.
src/Features/Settled.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function resolved(...$data)
22 22
     {
23
-        return new Promise(static function (Promised $p) use ($data) {
23
+        return new Promise(static function(Promised $p) use ($data) {
24 24
             $p->resolve(...$data);
25 25
         });
26 26
     }
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public static function rejected(...$data)
34 34
     {
35
-        return new Promise(static function (Promised $p) use ($data) {
35
+        return new Promise(static function(Promised $p) use ($data) {
36 36
             $p->reject(...$data);
37 37
         });
38 38
     }
Please login to merge, or discard this patch.
src/Features/All.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
         $sid = Stacked::in(...$promises);
39 39
 
40 40
         foreach ($promises as $pid => $promise) {
41
-            $promise->then(static function (...$args) use ($all, $sid, $pid) {
41
+            $promise->then(static function(...$args) use ($all, $sid, $pid) {
42 42
                 $all->pended() && $all->apResolving($sid, $pid, ...$args);
43
-            }, static function (...$args) use ($all) {
43
+            }, static function(...$args) use ($all) {
44 44
                 $all->pended() && $all->reject(...$args);
45 45
             });
46 46
         }
47 47
 
48
-        $all->then(null, static function (...$args) use ($sid) {
48
+        $all->then(null, static function(...$args) use ($sid) {
49 49
             foreach (Stacked::out($sid) as $promise) {
50 50
                 $promise->pended() && $promise->reject(...$args);
51 51
             }
Please login to merge, or discard this patch.
src/Features/Race.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
         $sid = Stacked::in(...$promises);
32 32
 
33 33
         foreach ($promises as $promise) {
34
-            $promise->then(static function (...$args) use ($race, $sid) {
34
+            $promise->then(static function(...$args) use ($race, $sid) {
35 35
                 if ($race->pended()) {
36 36
                     $race->resolve(...$args);
37 37
                     $race->rpInterrupt($sid);
38 38
                 }
39
-            }, static function (...$args) use ($race) {
39
+            }, static function(...$args) use ($race) {
40 40
                 if ($race->pended()) {
41 41
                     $race->reject(...$args);
42 42
                 }
43 43
             });
44 44
         }
45 45
 
46
-        $race->then(null, static function (...$args) use ($race, $sid) {
46
+        $race->then(null, static function(...$args) use ($race, $sid) {
47 47
             $race->rpInterrupt($sid, $race->rpException(...$args));
48 48
         });
49 49
 
Please login to merge, or discard this patch.
src/Features/Fusion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     {
26 26
         $this->fusion = true;
27 27
 
28
-        $this->catch(static function (Throwable $e = null) {
28
+        $this->catch(static function(Throwable $e = null) {
29 29
             if ($e) {
30 30
                 throw $e;
31 31
             }
Please login to merge, or discard this patch.
src/Promise.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function pended() : bool
81 81
     {
82
-        return ! $this->ack;
82
+        return !$this->ack;
83 83
     }
84 84
 
85 85
     /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      * @param callable $onThrowing
113 113
      * @return Promised
114 114
      */
115
-    public function catch(callable $onThrowing) : Promised
115
+    public function catch (callable $onThrowing) : Promised
116 116
     {
117 117
         return $this->then(null, $onThrowing);
118 118
     }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     private function resolver(Promised $promised, int $type) : Closure
168 168
     {
169
-        return static function (...$args) use ($promised, $type) {
169
+        return static function(...$args) use ($promised, $type) {
170 170
             $type === self::FULFILLED
171 171
                 ? $promised->resolve(...$args)
172 172
                 : $promised->reject(...$args)
Please login to merge, or discard this patch.