<commit_before><?php
/**
 * Created by PhpStorm.
 * User: sunanzhi
 * Date: 2018/5/10
 * Time: 15:54.
 */

namespace Eelly\SDK\Live\Api;

use Eelly\DTO\UidDTO;
use Eelly\SDK\EellyClient;
use Eelly\SDK\Live\Service\LiveShareInterface;

class LiveShare implements LiveShareInterface
{
    /**
     * 直播间分享.
     *
     * @param int    $liveId 当前进入的直播间id
     * @param string $type   直播间的类型 [app-分享、pc端-分享、小程序-分享]
     * @param UidDTO $user   当前登陆的用户
     * @requestExample({
     *     "liveId":1,
     *     "type":"小程序-分享"
     * })
     * @returnExample({
     *     "code":200,
     *     "msg":"分享信息记录成功",
     *     "data":{
     *      "uniqueFlag":"5b07c5b5b7490"
     *    }
     * })
     *
     * @author sunanzhi<<EMAIL>>
     *
     * @since 2018年5月25日
     */
    public function share(int $liveId, string $type = null, UidDTO $user = null)
    {
        return EellyClient::request('live/liveShare', __FUNCTION__, true, $liveId, $type);
    }

    /**
     * 进入分享反馈.
     *
     * @param string $uniqueFlag 直播间分享返回的唯一标识
     * @param string $type       进入直播间的类型 [小程序进入、pc端进入]
     * @param UidDTO $user       当前登陆的用户
     *
     * @requestExample({
     *     "uniqueFlag":"5b07c5b5b7490",
     *     "type":"小程序进入"
     * })
     *
     * @returnExample({
     *     "code":200,
     *     "msg":"反馈记录成功"
     * })
     *
     * @author sunanzhi<<EMAIL>>
     *
     * @since 2018年5月25日
     */
    public function shareFeedback(string $uniqueFlag, string $type = null, UidDTO $user = null)
    {
        return EellyClient::request('live/liveShare', __FUNCTION__, true, $uniqueFlag, $type);
    }

    /**
     * @return self
     */
    public static function getInstance(): self
    {
        static $instance;
        if (null === $instance) {
            $instance = new self();
        }

        return $instance;
    }
}<commit_msg>添加 $user<commit_after><?php
/**
 * Created by PhpStorm.
 * User: sunanzhi
 * Date: 2018/5/10
 * Time: 15:54.
 */

namespace Eelly\SDK\Live\Api;

use Eelly\DTO\UidDTO;
use Eelly\SDK\EellyClient;
use Eelly\SDK\Live\Service\LiveShareInterface;

class LiveShare implements LiveShareInterface
{
    /**
     * 直播间分享.
     *
     * @param int    $liveId 当前进入的直播间id
     * @param string $type   直播间的类型 [app-分享、pc端-分享、小程序-分享]
     * @param UidDTO $user   当前登陆的用户
     * @requestExample({
     *     "liveId":1,
     *     "type":"小程序-分享"
     * })
     * @returnExample({
     *     "code":200,
     *     "msg":"分享信息记录成功",
     *     "data":{
     *      "uniqueFlag":"5b07c5b5b7490"
     *    }
     * })
     *
     * @author sunanzhi<<EMAIL>>
     *
     * @since 2018年5月25日
     */
    public function share(int $liveId, string $type = null, UidDTO $user = null)
    {
        return EellyClient::request('live/liveShare', __FUNCTION__, true, $liveId, $type, $user);
    }

    /**
     * 进入分享反馈.
     *
     * @param string $uniqueFlag 直播间分享返回的唯一标识
     * @param string $type       进入直播间的类型 [小程序进入、pc端进入]
     * @param UidDTO $user       当前登陆的用户
     *
     * @requestExample({
     *     "uniqueFlag":"5b07c5b5b7490",
     *     "type":"小程序进入"
     * })
     *
     * @returnExample({
     *     "code":200,
     *     "msg":"反馈记录成功"
     * })
     *
     * @author sunanzhi<<EMAIL>>
     *
     * @since 2018年5月25日
     */
    public function shareFeedback(string $uniqueFlag, string $type = null, UidDTO $user = null)
    {
        return EellyClient::request('live/liveShare', __FUNCTION__, true, $uniqueFlag, $type, $user);
    }

    /**
     * @return self
     */
    public static function getInstance(): self
    {
        static $instance;
        if (null === $instance) {
            $instance = new self();
        }

        return $instance;
    }
}
{'fraction_non_alphanumeric': 0.1482378262039279, 'fraction_numerical': 0.026903416733925208, 'mean_word_length': 1.9839486356340288, 'pattern_counts': {'":': 20, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '753127', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1503, 'n_words': 245}