Code Duplication    Length = 11-13 lines in 3 locations

src/Api/Ip.php 1 location

@@ 33-44 (lines=12) @@
30
     *
31
     * @return IndexResponse|ResponseInterface
32
     */
33
    public function index(bool $dedicated = false)
34
    {
35
        Assert::boolean($dedicated);
36
37
        $params = [
38
            'dedicated' => $dedicated,
39
        ];
40
41
        $response = $this->httpGet('/v3/ips', $params);
42
43
        return $this->hydrateResponse($response, IndexResponse::class);
44
    }
45
46
    /**
47
     * Returns a list of IPs assigned to a domain.

src/Api/Tag.php 1 location

@@ 38-48 (lines=11) @@
35
     *
36
     * @return IndexResponse|ResponseInterface
37
     */
38
    public function index(string $domain, int $limit = 100)
39
    {
40
        Assert::stringNotEmpty($domain);
41
        $params = [
42
            'limit' => $limit,
43
        ];
44
45
        $response = $this->httpGet(sprintf('/v3/%s/tags', $domain), $params);
46
47
        return $this->hydrateResponse($response, IndexResponse::class);
48
    }
49
50
    /**
51
     * Returns a single tag.

src/Api/EmailValidation.php 1 location

@@ 45-57 (lines=13) @@
42
     *
43
     * @return ValidateResponse|ResponseInterface
44
     */
45
    public function validate(string $address, bool $mailboxVerification = false)
46
    {
47
        Assert::stringNotEmpty($address);
48
49
        $params = [
50
            'address' => $address,
51
            'mailbox_verification' => $mailboxVerification,
52
        ];
53
54
        $response = $this->httpGet('/address/private/validate', $params);
55
56
        return $this->hydrateResponse($response, ValidateResponse::class);
57
    }
58
59
    /**
60
     * Parses a delimiter-separated list of email addresses into two lists: parsed addresses and unparsable portions.