Skip to content

Commit a5dbe66

Browse files
committed
Remove unused params
1 parent 7ececca commit a5dbe66

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

api.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,19 @@ public function issueChannelAccessToken($channelId, $channelSecret)
159159
* Revoke channel access token.
160160
* https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token
161161
*
162+
* @param string $channelAccessToken Specify a channel access token you hope to revoke. (optional)
163+
*
162164
* @return boolean If it success, will return `true`.
163165
*/
164-
public function revokeChannelAccessToken()
166+
public function revokeChannelAccessToken($channelAccessToken = "")
165167
{
166168
$header = array(
167169
"Content-Type: application/x-www-form-urlencoded",
168170
);
169171

170172
$content = http_build_query(
171173
array(
172-
"access_token" => $this->channelAccessToken,
174+
"access_token" => $channelAccessToken ?: $this->channelAccessToken,
173175
)
174176
);
175177

@@ -288,14 +290,13 @@ public function getProfile($userId)
288290
* Get the user ID of all users who added your LINE Official Accout as a friend.
289291
* https://developers.line.biz/en/reference/messaging-api/#get-follower-ids
290292
*
291-
* @param string $groupId
292293
* @param string $continuationToken (optional)
293294
*
294295
* @return object
295296
*/
296-
public function getFollowersIds($groupId, $continuationToken = null)
297+
public function getFollowersIds($continuationToken = "")
297298
{
298-
$next = $continuationToken != null ? "?start=$continuationToken" : "";
299+
$next = $continuationToken ? "?start=$continuationToken" : "";
299300
return $this->requestFactory(
300301
self::API_HOST . "/v2/bot/followers/ids$next",
301302
self::HTTP_METHOD_GET
@@ -360,9 +361,9 @@ public function getGroupMemberInfo($groupId, $userId)
360361
*
361362
* @return object
362363
*/
363-
public function getGroupMemberIds($groupId, $continuationToken = null)
364+
public function getGroupMemberIds($groupId, $continuationToken = "")
364365
{
365-
$next = $continuationToken != null ? "?start=$continuationToken" : "";
366+
$next = $continuationToken ? "?start=$continuationToken" : "";
366367
return $this->requestFactory(
367368
self::API_HOST . "/v2/bot/group/$groupId/members/ids$next",
368369
self::HTTP_METHOD_GET
@@ -427,9 +428,9 @@ public function getRoomMemberInfo($roomId, $userId)
427428
*
428429
* @return object
429430
*/
430-
public function getRoomMemberIds($roomId, $continuationToken = null)
431+
public function getRoomMemberIds($roomId, $continuationToken = "")
431432
{
432-
$next = $continuationToken != null ? "?start=$continuationToken" : "";
433+
$next = $continuationToken ? "?start=$continuationToken" : "";
433434
return $this->requestFactory(
434435
self::API_HOST . "/v2/bot/room/$roomId/members/ids$next",
435436
self::HTTP_METHOD_GET
@@ -446,7 +447,6 @@ public function getRoomMemberIds($roomId, $continuationToken = null)
446447
*/
447448
public function leaveRoom($roomId)
448449
{
449-
$next = $continuationToken != null ? "?start=$continuationToken" : "";
450450
return $this->requestFactory(
451451
self::API_HOST . "/v2/bot/room/$roomId/leave",
452452
self::HTTP_METHOD_POST
@@ -555,7 +555,7 @@ public function multicast($targetIds, $message, $notificationDisabled = false)
555555
*
556556
* @return object
557557
*/
558-
public function broadcast($targetIds, $message, $notificationDisabled = false)
558+
public function broadcast($message, $notificationDisabled = false)
559559
{
560560
if (array_key_exists("type", $message)) {
561561
$messages = array($message);
@@ -581,7 +581,7 @@ public function broadcast($targetIds, $message, $notificationDisabled = false)
581581
*
582582
* @return object
583583
*/
584-
public function getSendMessagesQuota($audienceGroupId)
584+
public function getSendMessagesQuota()
585585
{
586586
return $this->requestFactory(
587587
self::API_HOST . "/v2/bot/message/quota",
@@ -595,7 +595,7 @@ public function getSendMessagesQuota($audienceGroupId)
595595
*
596596
* @return object
597597
*/
598-
public function getAllMessagesSentCount($audienceGroupId)
598+
public function getAllMessagesSentCount()
599599
{
600600
return $this->requestFactory(
601601
self::API_HOST . "/v2/bot/message/quota/consumption",
@@ -609,7 +609,7 @@ public function getAllMessagesSentCount($audienceGroupId)
609609
*
610610
* @return object
611611
*/
612-
public function getReplyMessagesSentCount($audienceGroupId)
612+
public function getReplyMessagesSentCount()
613613
{
614614
return $this->requestFactory(
615615
self::API_HOST . "/v2/bot/message/delivery/reply",
@@ -623,7 +623,7 @@ public function getReplyMessagesSentCount($audienceGroupId)
623623
*
624624
* @return object
625625
*/
626-
public function getPushMessagesSentCount($audienceGroupId)
626+
public function getPushMessagesSentCount()
627627
{
628628
return $this->requestFactory(
629629
self::API_HOST . "/v2/bot/message/delivery/push",
@@ -637,7 +637,7 @@ public function getPushMessagesSentCount($audienceGroupId)
637637
*
638638
* @return object
639639
*/
640-
public function getMulticastMessagesSentCount($audienceGroupId)
640+
public function getMulticastMessagesSentCount()
641641
{
642642
return $this->requestFactory(
643643
self::API_HOST . "/v2/bot/message/delivery/multicast",
@@ -651,7 +651,7 @@ public function getMulticastMessagesSentCount($audienceGroupId)
651651
*
652652
* @return object
653653
*/
654-
public function getBroadcastMessagesSentCount($audienceGroupId)
654+
public function getBroadcastMessagesSentCount()
655655
{
656656
return $this->requestFactory(
657657
self::API_HOST . "/v2/bot/message/delivery/broadcast",

0 commit comments

Comments
 (0)