Completed
Push — master ( 1af3dd...697623 )
by Ivannis Suárez
02:35
created
Tests/Units/Loop/Timer/TimerTests.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function testConstructor()
47 47
     {
48 48
         $this
49
-            ->exception(function () {
49
+            ->exception(function() {
50 50
                 $this->newTestedInstance(
51 51
                     Factory::create(),
52 52
                     $this->delegateMock(),
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             )
71 71
             /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */
72 72
             ->let($timer = $this->newTestedInstance($loop, $task, 0.001))
73
-            ->when(function () use ($loop, $timer, $onFulfilled) {
73
+            ->when(function() use ($loop, $timer, $onFulfilled) {
74 74
                 $timer->then($onFulfilled);
75 75
                 $loop->run();
76 76
             })
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */
99 99
             ->let($timer = $this->newTestedInstance($loop, $task, 0.001, true, 2))
100 100
             /* @var \Cubiche\Core\Async\Loop\Timer\TimerInterface $timer */
101
-            ->when(function () use ($loop, $timer, $onRejected, $onNotify) {
101
+            ->when(function() use ($loop, $timer, $onRejected, $onNotify) {
102 102
                 $timer->then(null, $onRejected, $onNotify);
103 103
                 $loop->run();
104 104
             })
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         return array(
122 122
             Factory::create(),
123
-            function () {
123
+            function() {
124 124
                 return 'foo';
125 125
             },
126 126
             0.001,
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     {
137 137
         $timeout = $this->newTestedInstance(
138 138
             $loop = Factory::create(),
139
-            function () {
139
+            function() {
140 140
                 return $this->defaultResolveValue();
141 141
             },
142 142
             0.001
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         $timer = $this->newTestedInstance(
147 147
             $loop = Factory::create(),
148
-            function () {
148
+            function() {
149 149
                 throw  $this->defaultRejectReason();
150 150
             },
151 151
             0.001,
Please login to merge, or discard this patch.
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.