Skip to content

Commit f3e4187

Browse files
Fix styles
1 parent 0ca3ab4 commit f3e4187

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/TwitterChannel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ private function addVideosIfGiven(TwitterMessage $twitterMessage): object
9090

9191
$media = $this->twitter->upload('media/upload', [
9292
'media' => $video->getPath(),
93-
'media_category' => "tweet_video",
94-
'media_type' => $video->getMimeType()
93+
'media_category' => 'tweet_video',
94+
'media_type' => $video->getMimeType(),
9595
], true);
9696

9797
$status = $this->twitter->mediaStatus($media->media_id_string);
9898

9999
$safety = 30; // We don't want to wait forever, stop after 30 checks.
100-
while (($status->processing_info->state == "pending" || $status->processing_info->state == "in_progress") && $safety > 0) {
100+
while (($status->processing_info->state == 'pending' || $status->processing_info->state == 'in_progress') && $safety > 0) {
101101
if (isset($status->processing_info->error)) {
102102
break;
103103
}

src/TwitterStatusUpdate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getRequestBody(): array
111111
->filter()
112112
->values();
113113

114-
if($mediaIds->count() > 0) {
114+
if ($mediaIds->count() > 0) {
115115
$body['media_ids'] = $mediaIds->implode(',');
116116
}
117117

tests/TwitterChannelTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function it_can_send_a_status_update_notification_with_videos()
8383
$status = new stdClass;
8484
$status->media_id_string = '2';
8585
$status->processing_info = new stdClass;
86-
$status->processing_info->state = "completed";
86+
$status->processing_info->state = 'completed';
8787

8888
$this->twitter->shouldReceive('setTimeouts')
8989
->once()
@@ -102,8 +102,8 @@ public function it_can_send_a_status_update_notification_with_videos()
102102
->once()
103103
->with('media/upload', [
104104
'media' => public_path('video.mp4'),
105-
'media_category' => "tweet_video",
106-
'media_type' => "video/mp4"
105+
'media_category' => 'tweet_video',
106+
'media_type' => 'video/mp4',
107107
], true)
108108
->andReturn($media);
109109

@@ -173,9 +173,9 @@ public function it_throws_an_exception_when_it_could_not_send_the_notification_w
173173
$status = new stdClass;
174174
$status->media_id_string = '2';
175175
$status->processing_info = new stdClass;
176-
$status->processing_info->state = "failed";
176+
$status->processing_info->state = 'failed';
177177
$status->processing_info->error = new stdClass;
178-
$status->processing_info->error->message = "invalid media";
178+
$status->processing_info->error->message = 'invalid media';
179179

180180
$this->twitter->shouldReceive('setTimeouts')
181181
->once()
@@ -185,8 +185,8 @@ public function it_throws_an_exception_when_it_could_not_send_the_notification_w
185185
->once()
186186
->with('media/upload', [
187187
'media' => public_path('video.mp4'),
188-
'media_category' => "tweet_video",
189-
'media_type' => "video/mp4"
188+
'media_category' => 'tweet_video',
189+
'media_type' => 'video/mp4',
190190
], true)
191191
->andReturn($media);
192192

tests/TwitterVideoTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ public function it_accepts_a_video_path_when_constructing_a_twitter_video(): voi
1818
{
1919
$video = new TwitterVideo('/foo/bar/baz.mp4');
2020
$this->assertEquals('/foo/bar/baz.mp4', $video->getPath());
21-
$this->assertEquals("video/mp4", $video->getMimeType());
21+
$this->assertEquals('video/mp4', $video->getMimeType());
2222
}
2323
}

0 commit comments

Comments
 (0)