Completed
Push — master ( 697623...9672ef )
by Ivannis Suárez
02:25
created
Tests/Units/Loop/LoopTests.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         $this
95 95
             ->given($onFulfilled = $this->delegateMock())
96
-            ->when(function () use ($loop, $timer, $onFulfilled) {
96
+            ->when(function() use ($loop, $timer, $onFulfilled) {
97 97
                 $timer->then($onFulfilled);
98 98
                 $loop->tick();
99 99
             })
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             $onRejected = $this->delegateMock(),
140 140
             $onNotify = $this->delegateMock()
141 141
         )
142
-        ->when(function () use ($loop, $timer, $onRejected, $onNotify) {
142
+        ->when(function() use ($loop, $timer, $onRejected, $onNotify) {
143 143
             $timer->then(null, $onRejected, $onNotify);
144 144
             $loop->run();
145 145
         })
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         $this
220 220
             ->given($onFulfilled = $this->delegateMock())
221
-            ->when(function () use ($loop, $promise, $onFulfilled) {
221
+            ->when(function() use ($loop, $promise, $onFulfilled) {
222 222
                 $promise->then($onFulfilled);
223 223
                 $loop->tick();
224 224
             })
Please login to merge, or discard this patch.
Loop/Timer/Timer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $this->task = new Delegate($task);
74 74
         $this->iterations = 0;
75
-        $onTick = function () {
75
+        $onTick = function() {
76 76
             $this->onTick();
77 77
         };
78 78
         if ($periodic) {
Please login to merge, or discard this patch.
Promise/Promises.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
          */
80 80
         foreach ($promises as $key => $promise) {
81 81
             $promise->then(
82
-                function ($value) use ($deferred, &$results, $map, $key, &$pending) {
82
+                function($value) use ($deferred, &$results, $map, $key, &$pending) {
83 83
                     if ($map !== null) {
84 84
                         $value = $map($value);
85 85
                     }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                         $deferred->resolve($results);
90 90
                     }
91 91
                 },
92
-                function ($reason) use ($deferred) {
92
+                function($reason) use ($deferred) {
93 93
                     $deferred->reject($reason);
94 94
                 }
95 95
             );
@@ -109,18 +109,18 @@  discard block
 block discarded – undo
109 109
     {
110 110
         $deferred = self::defer();
111 111
         $timer = $loop->timeout(
112
-            function () use ($promise, $deferred, $time) {
112
+            function() use ($promise, $deferred, $time) {
113 113
                 $deferred->reject(new TimeoutException($time));
114 114
             },
115 115
             $time
116 116
         );
117 117
 
118 118
         $promise->then(
119
-            function ($value = null) use ($deferred, $timer) {
119
+            function($value = null) use ($deferred, $timer) {
120 120
                 $timer->cancel();
121 121
                 $deferred->resolve($value);
122 122
             },
123
-            function ($reason = null) use ($deferred, $timer) {
123
+            function($reason = null) use ($deferred, $timer) {
124 124
                 $timer->cancel();
125 125
                 $deferred->reject($reason);
126 126
             }
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
         }
148 148
 
149 149
         $promise->then(
150
-            function ($value = null) use (&$result) {
150
+            function($value = null) use (&$result) {
151 151
                 $result = $value;
152 152
             },
153
-            function ($reason = null) use (&$rejectionReason) {
153
+            function($reason = null) use (&$rejectionReason) {
154 154
                 $rejectionReason = $reason;
155 155
             }
156 156
         )->always(
157
-            function () use ($loop) {
157
+            function() use ($loop) {
158 158
                 $loop->stop();
159 159
             }
160 160
         );
Please login to merge, or discard this patch.
Promise/AbstractPromise.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
      */
32 32
     public function always(callable $onFulfilledOrRejected, callable $onNotify = null)
33 33
     {
34
-        return $this->then(function ($value) use ($onFulfilledOrRejected) {
34
+        return $this->then(function($value) use ($onFulfilledOrRejected) {
35 35
             $onFulfilledOrRejected($value);
36 36
 
37 37
             return $value;
38
-        }, function ($reason) use ($onFulfilledOrRejected) {
38
+        }, function($reason) use ($onFulfilledOrRejected) {
39 39
             $onFulfilledOrRejected($reason);
40 40
         }, $onNotify);
41 41
     }
Please login to merge, or discard this patch.