public function mapArrayToCompany(array $company) { $company = $this->companyFactory->createCompany(ArrayHelper::hasValue($company, "id"), ArrayHelper::hasValue($company, "name", true), ArrayHelper::hasValue($company, "contactName"), ArrayHelper::hasValue($company, "email"), ArrayHelper::hasValue($company, "phoneNumber"), ArrayHelper::hasValue($company, "region"), ArrayHelper::hasValue($company, "website", true), ArrayHelper::hasValue($company, "status", true)); return $company; }