<?php namespace Lc\CaracoleBundle\Factory\Credit; use App\Entity\Credit\CreditHistory; use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; use Lc\CaracoleBundle\Model\User\UserMerchantInterface; use Lc\SovBundle\Factory\AbstractFactory; use Lc\SovBundle\Model\User\UserInterface; class CreditHistoryFactory extends AbstractFactory { // createCreditHistory public function create(string $type, UserMerchantInterface $userMerchant): CreditHistoryInterface { $creditHistory = new CreditHistory(); $creditHistory->setType($type) ; $creditHistory->setUserMerchant($userMerchant) ; return $creditHistory; } }