@@ -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 | return new TwitterOAuth( |
19 | 19 | config('services.twitter.consumer_key'), |
20 | 20 | config('services.twitter.consumer_secret'), |
@@ -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 |
@@ -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 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) { |
69 | 69 | $this->twitter->setTimeouts(10, 15); |
70 | 70 | |
71 | - $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) { |
|
71 | + $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function(TwitterImage $image) { |
|
72 | 72 | $media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]); |
73 | 73 | |
74 | 74 | return $media->media_id_string; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getVideos()) { |
87 | 87 | $this->twitter->setTimeouts(10, 15); |
88 | 88 | |
89 | - $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function (TwitterVideo $video) { |
|
89 | + $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function(TwitterVideo $video) { |
|
90 | 90 | $media = $this->twitter->upload('media/upload', [ |
91 | 91 | 'media' => $video->getPath(), |
92 | 92 | 'media_category' => 'tweet_video', |