Beispiel #1
0
 /**
  * Get primary applicant of account
  *
  * @return AccountOwnerInterface|null
  */
 public function getPrimaryApplicant()
 {
     $owners = $this->getOwners();
     if (!$this->client->isMarried() && array_key_exists(ClientAccountOwner::OWNER_TYPE_SELF, $owners)) {
         return $owners[ClientAccountOwner::OWNER_TYPE_SELF];
     }
     $primaryApplicant = null;
     if (array_key_exists(ClientAccountOwner::OWNER_TYPE_SELF, $owners)) {
         $primaryApplicant = $owners[ClientAccountOwner::OWNER_TYPE_SELF];
     } elseif (array_key_exists(ClientAccountOwner::OWNER_TYPE_SPOUSE, $owners)) {
         $primaryApplicant = $owners[ClientAccountOwner::OWNER_TYPE_SPOUSE];
     }
     return $primaryApplicant;
 }