@@ -1,9 +1,9 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ApiClients\Tools\Rx; |
4 | 4 | |
5 | 5 | // @codeCoverageIgnoreStart |
6 | 6 | if (!function_exists('ApiClients\Tools\Rx\unwrapObservableFromPromise')) { |
7 | - require __DIR__ . '/functions.php'; |
|
7 | + require __DIR__.'/functions.php'; |
|
8 | 8 | } |
9 | 9 | // @codeCoverageIgnoreEnd |
@@ -1,7 +1,7 @@ |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | use Rx\Scheduler; |
4 | 4 | |
5 | -Scheduler::setDefaultFactory(function () { |
|
5 | +Scheduler::setDefaultFactory(function() { |
|
6 | 6 | return new Scheduler\ImmediateScheduler(); |
7 | 7 | }); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | namespace ApiClients\Tools\Rx; |
4 | 4 | |
@@ -20,18 +20,18 @@ discard block |
||
20 | 20 | function unwrapObservableFromPromise(PromiseInterface $promise): Observable |
21 | 21 | { |
22 | 22 | return Observable::create( |
23 | - function ( |
|
23 | + function( |
|
24 | 24 | ObserverInterface $observer |
25 | 25 | ) use ($promise) { |
26 | - resolve($promise)->done(function (Observable $observable) use ($observer) { |
|
26 | + resolve($promise)->done(function(Observable $observable) use ($observer) { |
|
27 | 27 | $observable->subscribe( |
28 | - function ($next) use ($observer) { |
|
28 | + function($next) use ($observer) { |
|
29 | 29 | $observer->onNext($next); |
30 | 30 | }, |
31 | - function ($error) use ($observer) { |
|
31 | + function($error) use ($observer) { |
|
32 | 32 | $observer->onError($error); |
33 | 33 | }, |
34 | - function () use ($observer) { |
|
34 | + function() use ($observer) { |
|
35 | 35 | $observer->onCompleted(); |
36 | 36 | } |
37 | 37 | ); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | function setAsyncScheduler(LoopInterface $loop) |
59 | 59 | { |
60 | 60 | try { |
61 | - Scheduler::setAsyncFactory(function () use ($loop) { |
|
61 | + Scheduler::setAsyncFactory(function() use ($loop) { |
|
62 | 62 | return new Scheduler\EventLoopScheduler($loop); |
63 | 63 | }); |
64 | 64 | } catch (Exception $e) { |