Code Duplication    Length = 9-10 lines in 2 locations

src/DirectAdmin/Objects/Domain.php 2 locations

@@ 256-264 (lines=9) @@
253
    /**
254
     * @return Forwarder[] Associative array of forwarders
255
     */
256
    public function getForwarders()
257
    {
258
        return $this->getCache(self::CACHE_FORWARDERS, function () {
259
            $forwarders = $this->getContext()->invokeGet('EMAIL_FORWARDERS', [
260
                'domain' => $this->getDomainName(),
261
            ]);
262
            return DomainObject::toDomainObjectArray($forwarders, Forwarder::class, $this);
263
        });
264
    }
265
266
    /**
267
     * @return Mailbox[] Associative array of mailboxes
@@ 269-278 (lines=10) @@
266
    /**
267
     * @return Mailbox[] Associative array of mailboxes
268
     */
269
    public function getMailboxes()
270
    {
271
        return $this->getCache(self::CACHE_MAILBOXES, function () {
272
            $boxes = $this->getContext()->invokeGet('POP', [
273
                'domain' => $this->getDomainName(),
274
                'action' => 'full_list',
275
            ]);
276
            return DomainObject::toDomainObjectArray($boxes, Mailbox::class, $this);
277
        });
278
    }
279
280
    /**
281
     * @return User