@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public bool $isJsonRequest = true; |
11 | 11 | |
12 | - public function __construct(private string|int $to, string $content) |
|
12 | + public function __construct(private string | int $to, string $content) |
|
13 | 13 | { |
14 | 14 | parent::__construct($content); |
15 | 15 | } |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @return $this |
38 | 38 | */ |
39 | - public function withImage(array|string $images): static |
|
39 | + public function withImage(array | string $images): static |
|
40 | 40 | { |
41 | 41 | $images = is_array($images) ? $images : [$images]; |
42 | 42 | |
43 | - collect($images)->each(function ($image) { |
|
43 | + collect($images)->each(function($image) { |
|
44 | 44 | $this->images[] = new TwitterImage($image); |
45 | 45 | }); |
46 | 46 | |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @return $this |
54 | 54 | */ |
55 | - public function withVideo(array|string $videos): static |
|
55 | + public function withVideo(array | string $videos): static |
|
56 | 56 | { |
57 | 57 | $videos = is_array($videos) ? $videos : [$videos]; |
58 | 58 | |
59 | - collect($videos)->each(function ($video) { |
|
59 | + collect($videos)->each(function($video) { |
|
60 | 60 | $this->videos[] = new TwitterVideo($video); |
61 | 61 | }); |
62 | 62 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | { |
15 | 15 | $this->app->when([TwitterChannel::class, TwitterDirectMessage::class]) |
16 | 16 | ->needs(TwitterOAuth::class) |
17 | - ->give(function () { |
|
17 | + ->give(function() { |
|
18 | 18 | $connection = new TwitterOAuth( |
19 | 19 | config('services.twitter.consumer_key'), |
20 | 20 | config('services.twitter.consumer_secret'), |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * |
20 | 20 | * @throws CouldNotSendNotification |
21 | 21 | */ |
22 | - public function send($notifiable, Notification $notification): array|object |
|
22 | + public function send($notifiable, Notification $notification): array | object |
|
23 | 23 | { |
24 | 24 | $this->changeTwitterSettingsIfNeeded($notifiable); |
25 | 25 | $this->twitter->setApiVersion('1.1'); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) { |
78 | 78 | $this->twitter->setTimeouts(10, 15); |
79 | 79 | |
80 | - $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) { |
|
80 | + $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function(TwitterImage $image) { |
|
81 | 81 | $media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]); |
82 | 82 | |
83 | 83 | return $media->media_id_string; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getVideos()) { |
96 | 96 | $this->twitter->setTimeouts(10, 15); |
97 | 97 | |
98 | - $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function (TwitterVideo $video) { |
|
98 | + $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function(TwitterVideo $video) { |
|
99 | 99 | $media = $this->twitter->upload('media/upload', [ |
100 | 100 | 'media' => $video->getPath(), |
101 | 101 | 'media_category' => 'tweet_video', |