Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

26 rindas
740B

  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. }