PR feedback: add type hints, create new methods and save on extra api request

MAILPOET-4601
This commit is contained in:
Oluwaseun Olorunsola
2022-09-16 06:42:38 +01:00
committed by Aschepikov
parent 32a58301b0
commit a006701d78
5 changed files with 35 additions and 28 deletions

View File

@@ -46,23 +46,27 @@ class AuthorizedSenderDomainController {
*
* Note: This includes both verified and unverified domains
*/
public function getAllSenderDomains(bool $skipCache = false): array {
if ($skipCache) {
$this->currentRecords = null;
}
public function getAllSenderDomains(): array {
return $this->returnAllDomains($this->getAllRecords());
}
public function getAllSenderDomainsIgnoringCache(): array {
$this->currentRecords = null;
return $this->getAllSenderDomains();
}
/**
* Get all Verified Sender Domains
*/
public function getVerifiedSenderDomains(bool $skipCache = false): array {
if ($skipCache) {
$this->currentRecords = null;
}
public function getVerifiedSenderDomains(): array {
return $this->returnVerifiedDomains($this->getAllRecords());
}
public function getVerifiedSenderDomainsIgnoringCache(): array {
$this->currentRecords = null;
return $this->getVerifiedSenderDomains();
}
/**
* Create new Sender Domain
*