| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __invoke( |
||
| 17 | ObservableInterface $observable, |
||
| 18 | ObserverInterface $observer, |
||
| 19 | SchedulerInterface $scheduler = null |
||
| 20 | ) { |
||
| 21 | return $observable->subscribe(new CallbackObserver( |
||
| 22 | function (string $json) use ($observer) { |
||
| 23 | $observer->onNext(json_decode($json, true)); |
||
| 24 | }, |
||
| 25 | [$observer, 'onError'], |
||
| 26 | [$observer, 'onCompleted'] |
||
| 27 | )); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |