Code Duplication    Length = 8-8 lines in 2 locations

src/ApiDriver.php 2 locations

@@ 140-147 (lines=8) @@
137
        return $response;
138
    }
139
140
    public function delete(string $email, string $listName = '')
141
    {
142
        $list = $this->lists->findByName($listName);
143
144
        $response = $this->mailChimp->delete("lists/{$list->getId()}/members/{$this->getSubscriberHash($email)}");
145
146
        return $response;
147
    }
148
149
    public function deletePermanently(string $email, string $listName = '')
150
    {
@@ 149-156 (lines=8) @@
146
        return $response;
147
    }
148
149
    public function deletePermanently(string $email, string $listName = '')
150
    {
151
        $list = $this->lists->findByName($listName);
152
153
        $response = $this->mailChimp->post("lists/{$list->getId()}/members/{$this->getSubscriberHash($email)}/actions/delete-permanent");
154
155
        return $response;
156
    }
157
158
    public function getTags(string $email, string $listName = '')
159
    {