Conditions | 2 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public function publish( |
||
41 | string $message, |
||
42 | string $link = '', |
||
43 | string $pictureLink = '', |
||
44 | string $caption = '', |
||
45 | string $description = '' |
||
46 | ): bool { |
||
47 | try { |
||
48 | $status = $this->prepareStatus($message, $link); |
||
49 | $post = $this->twitter->post('statuses/update', ['status' => $status, 'trim_user' => true]); |
||
50 | |||
51 | return !empty($post->id_str); |
||
52 | } catch (Throwable $t) { |
||
53 | throw new FailureWhenPublishingSocialPost($t); |
||
54 | } |
||
55 | } |
||
56 | |||
78 |