| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| 1 | <?php |
||
| 11 | public function log(): ObservableInterface |
||
| 12 | { |
||
| 13 | return $this->getPusher()->channel('job-' . $this->id)->filter(function ($message) { |
||
| 14 | return $message->event == 'job:log'; |
||
| 15 | })->map(function ($message) { |
||
| 16 | return json_decode($message->data, true); |
||
| 17 | })->map(function (array $json) { |
||
| 18 | return $this->getTransport()->getHydrator()->hydrate('LogLine', $json); |
||
| 19 | }); |
||
| 20 | } |
||
| 21 | } |
||
| 22 |