Code Duplication    Length = 12-13 lines in 2 locations

src/Client.php 2 locations

@@ 23-34 (lines=12) @@
20
        $this->http = $httpClient ?: new \GuzzleHttp\Client(['base_uri' => $this->url]);
21
    }
22
23
    public function createAccount($shortName, $authorName = '', $authorUrl = '')
24
    {
25
        $response = $this->http->post('/createAccount', [
26
            'json' => [
27
                'short_name' => $shortName,
28
                'author_name' => $authorName,
29
                'author_url' => $authorUrl
30
            ]
31
        ]);
32
33
        return new Account($this->handleResponse($response));
34
    }
35
36
    public function editAccountInfo($account, $shortName = '', $authorName = '', $authorUrl = '')
37
    {
@@ 36-48 (lines=13) @@
33
        return new Account($this->handleResponse($response));
34
    }
35
36
    public function editAccountInfo($account, $shortName = '', $authorName = '', $authorUrl = '')
37
    {
38
        $response = $this->http->post('/editAccountInfo', [
39
            'json' => [
40
                'access_token' => $this->getAccessToken($account),
41
                'short_name' => $shortName,
42
                'author_name' => $authorName,
43
                'author_url' => $authorUrl
44
            ]
45
        ]);
46
47
        return new Account($this->handleResponse($response));
48
    }
49
50
    public function getAccountInfo($account, $fields = ['short_name', 'author_name', 'author_url'])
51
    {