Code Duplication    Length = 15-15 lines in 2 locations

src/Providers/AbstractProvider.php 1 location

@@ 372-386 (lines=15) @@
369
     *
370
     * @return array
371
     */
372
    protected function getCodeFields($state = null)
373
    {
374
        $fields = array_merge([
375
            'client_id' => $this->clientId,
376
            'redirect_uri' => $this->redirectUrl,
377
            'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
378
            'response_type' => 'code',
379
        ], $this->parameters);
380
381
        if ($this->usesState()) {
382
            $fields['state'] = $state;
383
        }
384
385
        return $fields;
386
    }
387
388
    /**
389
     * Format the given scopes.

src/Providers/DouYinProvider.php 1 location

@@ 51-65 (lines=15) @@
48
     *
49
     * @return array
50
     */
51
    public function getCodeFields($state = null)
52
    {
53
        $fields = [
54
            'client_key' => $this->clientId,
55
            'redirect_uri' => $this->redirectUrl,
56
            'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator),
57
            'response_type' => 'code',
58
        ];
59
60
        if ($this->usesState()) {
61
            $fields['state'] = $state;
62
        }
63
64
        return $fields;
65
    }
66
67
    /**
68
     * 获取access_token地址.