Skip to content

Commit

Permalink
🌮 兼容 PHP 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
metowolf committed May 9, 2018
1 parent d3b6a12 commit 1bf32a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/plugins/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected static function work()
return;
}

$groups = static::list();
$groups = static::getList();
$count = count($groups);
foreach ($groups as $group) {
$count -= static::signIn($group);
Expand All @@ -43,7 +43,7 @@ protected static function work()
}
}

public static function list()
protected static function getList()
{
$payload = [];
$data = Curl::post('https://api.vc.bilibili.com/link_group/v1/member/my_groups', static::sign($payload));
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/SmallTV.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected static function work()
if (static::check($vo)) {
static::join($vo);
} else {
static::unset($vo);
static::drop($vo);
}
}
if ($vo['status'] == 1 && $vo['lock'] <= time()) {
Expand All @@ -50,7 +50,7 @@ protected static function work()
}
}

protected static function unset($value)
protected static function drop($value)
{
unset(static::$config['data'][static::PLUGIN_NAME]['smallTV'][$value['tvid']]);
}
Expand Down Expand Up @@ -124,7 +124,7 @@ protected static function join($value)

if (isset($data['code']) && $data['code']) {
Log::error("小电视 #{$value['tvid']} 抽奖加入失败");
static::unset($value);
static::drop($value);
return;
}

Expand All @@ -143,7 +143,7 @@ protected static function notice($value)

if (isset($data['msg']) && $data['msg'] != 'ok') {
Log::error("小电视 #{$value['tvid']} 抽奖失败");
static::unset($value);
static::drop($value);
}

if ($data['data']['status'] == 3) {
Expand All @@ -152,7 +152,7 @@ protected static function notice($value)
}

Log::notice("在直播间 {$value['roomid']} 获得 {$data['data']['gift_num']}{$data['data']['gift_name']}");
static::unset($value);
static::drop($value);
}


Expand Down

0 comments on commit 1bf32a1

Please sign in to comment.