@@ -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'), |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * |
| 21 | 21 | * @throws CouldNotSendNotification |
| 22 | 22 | */ |
| 23 | - public function send($notifiable, Notification $notification): array|object |
|
| 23 | + public function send($notifiable, Notification $notification): array | object |
|
| 24 | 24 | { |
| 25 | 25 | $this->changeTwitterSettingsIfNeeded($notifiable); |
| 26 | 26 | $this->twitter->setApiVersion('1.1'); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) { |
| 79 | 79 | $this->twitter->setTimeouts(10, 15); |
| 80 | 80 | |
| 81 | - $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) { |
|
| 81 | + $twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function(TwitterImage $image) { |
|
| 82 | 82 | $media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]); |
| 83 | 83 | |
| 84 | 84 | return $media->media_id_string; |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getVideos()) { |
| 97 | 97 | $this->twitter->setTimeouts(10, 15); |
| 98 | 98 | |
| 99 | - $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function (TwitterVideo $video) { |
|
| 99 | + $twitterMessage->videoIds = collect($twitterMessage->getVideos())->map(function(TwitterVideo $video) { |
|
| 100 | 100 | $media = $this->twitter->upload( |
| 101 | 101 | 'media/upload', |
| 102 | 102 | [ |