Code Duplication    Length = 9-9 lines in 2 locations

src/Providers/WeChatProvider.php 1 location

@@ 95-103 (lines=9) @@
92
    /**
93
     * {@inheritdoc}.
94
     */
95
    public function getAccessToken($code)
96
    {
97
        $response = $this->getHttpClient()->get($this->getTokenUrl(), [
98
            'headers' => ['Accept' => 'application/json'],
99
            'query' => $this->getTokenFields($code),
100
        ]);
101
102
        return $this->parseAccessToken($response->getBody());
103
    }
104
105
    /**
106
     * {@inheritdoc}.

src/Providers/FeiShuProvider.php 1 location

@@ 90-98 (lines=9) @@
87
     *
88
     * @return \Overtrue\Socialite\AccessToken
89
     */
90
    public function getAccessToken($code = '')
91
    {
92
        $response = $this->getHttpClient()->post($this->getTokenUrl(), [
93
            'headers' => ['Content-Type' => 'application/json'],
94
            'json' => $this->getTokenFields($code),
95
        ]);
96
97
        return $this->parseAccessToken($response->getBody()->getContents());
98
    }
99
100
    /**
101
     * 获取 app_access_token 接口参数.