Completed
Push — master ( b5ca72...63f4f3 )
by Ivannis Suárez
02:05
created
Tests/Units/PromiseInterfaceTestCase.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         $this
59 59
             ->getAssertionManager()
60
-                ->setHandler('delegateCall', function (MockAggregator $mock) {
60
+                ->setHandler('delegateCall', function(MockAggregator $mock) {
61 61
                     return $this->delegateCall($mock);
62 62
                 })
63 63
         ;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                 $rejected = $this->delegateMock(),
112 112
                 $notify = $this->delegateMock()
113 113
             )
114
-            ->when(function () use ($promise, $succeed, $rejected, $notify) {
114
+            ->when(function() use ($promise, $succeed, $rejected, $notify) {
115 115
                 $promise->then($succeed, $rejected, $notify);
116 116
                 $this->resolve('foo');
117 117
             })
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 $notify = $this->delegateMock(),
134 134
                 $reason = new \Exception()
135 135
             )
136
-            ->when(function () use ($promise, $succeed, $rejected, $notify, $reason) {
136
+            ->when(function() use ($promise, $succeed, $rejected, $notify, $reason) {
137 137
                 $promise->then($succeed, $rejected, $notify);
138 138
                 $this->reject($reason);
139 139
             })
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
                 $rejected = $this->delegateMock(),
155 155
                 $notify = $this->delegateMock()
156 156
             )
157
-            ->when(function () use ($promise, $succeed, $rejected, $notify) {
157
+            ->when(function() use ($promise, $succeed, $rejected, $notify) {
158 158
                 $promise->then($succeed, $rejected, $notify);
159 159
                 for ($i = 0; $i < 10; ++$i) {
160 160
                     $this->notify(($i + 1) * 10);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
                 $succeedThen = $this->delegateMock()
179 179
             )
180 180
             ->let($promiseThen = $promise->then($succeed, $rejected, $notify))
181
-            ->when(function () use ($promiseThen, $succeedThen) {
181
+            ->when(function() use ($promiseThen, $succeedThen) {
182 182
                 $promiseThen->then($succeedThen);
183 183
                 $this->resolve('foo');
184 184
             })
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
             ->then()
300 300
                 ->delegateCall($otherwise)
301 301
                     ->with()
302
-                    ->arguments(0, function ($argument) {
302
+                    ->arguments(0, function($argument) {
303 303
                         $this->object($argument)->isInstanceOf(\RuntimeException::class);
304 304
                     })
305 305
                     ->once()
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
      */
332 332
     public function testResolvedPromise()
333 333
     {
334
-        $this->resolvedRejectedPromiseTest(function () {
334
+        $this->resolvedRejectedPromiseTest(function() {
335 335
             $this->resolve();
336 336
         });
337 337
     }
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
      */
342 342
     public function testRejectedPromise()
343 343
     {
344
-        $this->resolvedRejectedPromiseTest(function () {
344
+        $this->resolvedRejectedPromiseTest(function() {
345 345
             $this->reject(new \Exception());
346 346
         });
347 347
     }
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
         ->if($this->promise())
356 356
             ->when($when)
357 357
             ->then()
358
-            ->exception(function () {
358
+            ->exception(function() {
359 359
                 $this->resolve();
360 360
             })->isInstanceOf(\LogicException::class)
361
-            ->exception(function () {
361
+            ->exception(function() {
362 362
                 $this->reject();
363 363
             })->isInstanceOf(\LogicException::class)
364
-            ->exception(function () {
364
+            ->exception(function() {
365 365
                 $this->notify();
366 366
             })->isInstanceOf(\LogicException::class)
367 367
             ;
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
     {
375 375
         $mockName = '\mock\Cubiche\Core\Delegate\Delegate';
376 376
 
377
-        return new $mockName(function ($value = null) use ($return) {
377
+        return new $mockName(function($value = null) use ($return) {
378 378
             return $return === null ? $value : $return;
379 379
         });
380 380
     }
Please login to merge, or discard this patch.