Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
56 | 4 | public function heartbeat(string $channelName): void |
|
57 | { |
||
58 | 4 | if (is_null($this->heart)) { |
|
59 | 1 | return; |
|
60 | } |
||
61 | 3 | if (!isset($this->channels[$channelName])) { |
|
62 | 1 | return; |
|
63 | } |
||
64 | try { |
||
65 | 2 | $this->heart->beat($this->channels[$channelName]); |
|
66 | 1 | } catch (Exception $e) { |
|
67 | // Ignore exceptions. |
||
68 | } |
||
69 | 2 | } |
|
70 | } |
||
71 |