createBase($userMerchant); $creditHistory->setType($type) ; return $creditHistory; } public function createBase(UserMerchantInterface $userMerchant): CreditHistoryInterface { $creditHistory = new CreditHistory(); $creditHistory->setUserMerchant($userMerchant) ; return $creditHistory; } }