You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReductionCreditFactory.php 740B

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
12345678910111213141516171819202122232425
  1. <?php
  2. namespace Lc\CaracoleBundle\Factory\Reduction;
  3. use App\Entity\Reduction\ReductionCredit;
  4. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  5. use Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface;
  6. use Lc\CaracoleBundle\Model\Reduction\ReductionCreditModel;
  7. use Lc\SovBundle\Factory\AbstractFactory;
  8. class ReductionCreditFactory extends AbstractFactory
  9. {
  10. public function create(MerchantInterface $merchant, string $type = ReductionCreditModel::TYPE_CREDIT): ReductionCreditInterface
  11. {
  12. $reductionCredit = new ReductionCredit();
  13. $reductionCredit->setMerchant($merchant);
  14. $reductionCredit->setType($type);
  15. $reductionCredit->setStatus(1);
  16. return $reductionCredit;
  17. }
  18. }