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

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