Skip to content

Commit 7f5c635

Browse files
author
Christoph Rumpel
authored
Merge pull request #27 from christophrumpel/master
Remove php56 from tests, sensio lab fixes
2 parents f839f83 + 513c1e5 commit 7f5c635

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
build
33
composer.phar
44
composer.lock
5-
.idea

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.6
54
- 7.0
65
- 7.1
76

CHANGELOG.md

100755100644
File mode changed.

CONTRIBUTING.md

100755100644
File mode changed.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Twitter notification channel for Laravel 5.4
1+
# Twitter notification channel for Laravel 5.3+
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/twitter.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/twitter)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)

src/TwitterChannel.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
class TwitterChannel
1010
{
11-
1211
/** @var TwitterOAuth */
1312
protected $twitter;
1413

@@ -38,7 +37,7 @@ public function send($notifiable, Notification $notification)
3837
if (is_a($twitterMessage, TwitterStatusUpdate::class) && $twitterMessage->getImages()) {
3938
$this->twitter->setTimeouts(10, 15);
4039

41-
$twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function ($image) {
40+
$twitterMessage->imageIds = collect($twitterMessage->getImages())->map(function (TwitterImage $image) {
4241
$media = $this->twitter->upload('media/upload', ['media' => $image->getPath()]);
4342

4443
return $media->media_id_string;
@@ -53,13 +52,12 @@ public function send($notifiable, Notification $notification)
5352
}
5453

5554
/**
56-
* Use per user settings instead of default ones
55+
* Use per user settings instead of default ones.
5756
* @param $twitterSettings
5857
*/
5958
private function switchSettings($twitterSettings)
6059
{
6160
$this->twitter = new TwitterOAuth($twitterSettings[0], $twitterSettings[1], $twitterSettings[2],
6261
$twitterSettings[3]);
6362
}
64-
6563
}

src/TwitterStatusUpdate.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44

55
use Kylewm\Brevity\Brevity;
66
use NotificationChannels\Twitter\Exceptions\CouldNotSendNotification;
7-
use NotificationChannels\Twitter\TwitterImage;
87

98
class TwitterStatusUpdate
109
{
11-
1210
/** @var string */
1311
protected $content;
1412

@@ -100,12 +98,12 @@ public function getRequestBody()
10098
}
10199

102100
/**
103-
* Check if the message length is too long
101+
* Check if the message length is too long.
104102
* @param $content
105103
* @param $brevity
106104
* @return int
107105
*/
108-
private function messageIsTooLong($content, $brevity)
106+
private function messageIsTooLong($content, Brevity $brevity)
109107
{
110108
$tweetLength = $brevity->tweetLength($content);
111109
$exceededLength = $tweetLength - 140;

0 commit comments

Comments
 (0)