Code Duplication    Length = 12-13 lines in 2 locations

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.

src/Api/MailingList.php 1 location

@@ 41-52 (lines=12) @@
38
     *
39
     * @throws \Exception
40
     */
41
    public function pages(int $limit = 100)
42
    {
43
        Assert::range($limit, 1, 1000);
44
45
        $params = [
46
            'limit' => $limit,
47
        ];
48
49
        $response = $this->httpGet('/v3/lists/pages', $params);
50
51
        return $this->hydrateResponse($response, PagesResponse::class);
52
    }
53
54
    /**
55
     * Creates a new mailing list on the current domain.