src/CasinoBundle/Entity/NewBonus.php line 58

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use App\CasinoBundle\Enum\BonusOfferTypeEnum;
  4. use App\CmsBundle\Entity\LogInterface;
  5. use App\CmsBundle\Entity\LogTrait;
  6. use App\CmsBundle\Entity\PublishedTrait;
  7. use App\CmsBundle\Entity\Site;
  8. use App\CmsBundle\Enum\LogActionEnum;
  9. use App\GamificationBundle\Entity\UserBonus;
  10. use App\GamificationBundle\Entity\VisitorBonus;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. use Doctrine\Common\Collections\Collection;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Symfony\Component\Validator\Constraints as Assert;
  15. use App\CmsBundle\Entity\TimeStampedTrait;
  16. use DateTime;
  17. use App\CmsBundle\Entity\IdTrait;
  18. use App\CmsBundle\Entity\TitleTrait;
  19. /**
  20.  * NewBonus
  21.  *
  22.  * @ORM\Table(
  23.  *     name="new_bonus",
  24.  *     indexes={
  25.  *          @ORM\Index(name="new_bonus_title_short_index", columns={"title_short"}),
  26.  *          @ORM\Index(name="new_bonus_title_index", columns={"title"}),
  27.  *          @ORM\Index(name="new_bonus_updated_index", columns={"updated"}),
  28.  *          @ORM\Index(name="new_bonus_amount_max_index", columns={"amount_max"}),
  29.  *          @ORM\Index(name="new_bonus_free_spins_index", columns={"free_spins"}),
  30.  *          @ORM\Index(name="new_bonus_percent_index", columns={"percent"}),
  31.  *          @ORM\Index(name="new_bonus_deposit_min_index", columns={"deposit_min"}),
  32.  *          @ORM\Index(name="new_bonus_code_index", columns={"code"}),
  33.  *          @ORM\Index(name="new_bonus_skin_bg_index", columns={"skin_bg"}),
  34.  *          @ORM\Index(name="new_bonus_skin_character_index", columns={"skin_character"}),
  35.  *          @ORM\Index(name="new_bonus_published_index", columns={"published"}),
  36.  *          @ORM\Index(name="new_bonus_clone_index", columns={"clone"}),
  37.  *          @ORM\Index(name="new_bonus_score_index", columns={"score"}),
  38.  *          @ORM\Index(name="new_bonus_expired_index", columns={"expired_date"}),
  39.  *          @ORM\Index(name="new_bonus_start_published_date_index", columns={"start_published_date"}),
  40.  *          @ORM\Index(name="new_bonus_end_published_date_index", columns={"end_published_date"})
  41.  *     },
  42.  *     uniqueConstraints={
  43.  *         @ORM\UniqueConstraint(name="new_bonus_hash_uindex", columns={"hash"})
  44.  *     }
  45.  * )
  46.  * @ORM\Entity(
  47.  *     repositoryClass="App\CasinoBundle\Repository\NewBonusRepository"
  48.  * )
  49.  * @ORM\HasLifecycleCallbacks()
  50.  * @ORM\Cache(
  51.  *     usage="NONSTRICT_READ_WRITE",
  52.  *     region="one_day"
  53.  * )
  54.  */
  55. class NewBonus implements LogInterface
  56. {
  57.     use IdTraitTitleTraitTimeStampedTraitScoreTraitAliasTraitHashTraitCacheTraitPublishedTraitLogTrait;
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(
  62.      *     name="title_short",
  63.      *     type="string",
  64.      *     length=255,
  65.      *     nullable=true
  66.      *     )
  67.      */
  68.     private $titleShort;
  69.     /**
  70.      * @ORM\ManyToOne(
  71.      *     targetEntity="App\CasinoBundle\Entity\Casino",
  72.      *     inversedBy="newBonuses",
  73.      *     cascade={"persist"}
  74.      * )
  75.      * @ORM\JoinColumn(
  76.      *     nullable=false
  77.      * )
  78.      */
  79.     private ?Casino $casino;
  80.     /**
  81.      * @ORM\ManyToMany (
  82.      *     targetEntity="App\CasinoBundle\Entity\BonusCategory",
  83.      *     inversedBy="newBonuses",
  84.      *     cascade={"persist"},
  85.      *     fetch="EXTRA_LAZY"
  86.      * )
  87.      * @ORM\JoinTable(
  88.      *     name="new_bonus_bonus_categories",
  89.      *     joinColumns={
  90.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  91.      *     },
  92.      *     inverseJoinColumns={
  93.      *          @ORM\JoinColumn(name="bonus_category_id", referencedColumnName="id")
  94.      *     }
  95.      * )
  96.      */
  97.     private Collection $bonusCategories;
  98.     /**
  99.      * @ORM\ManyToMany (
  100.      *     targetEntity="App\CasinoBundle\Entity\BonusType",
  101.      *     inversedBy="newBonuses",
  102.      *     cascade={"persist"},
  103.      *     fetch="EXTRA_LAZY"
  104.      * )
  105.      * @ORM\JoinTable(
  106.      *     name="new_bonus_bonus_type",
  107.      *     joinColumns={
  108.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  109.      *     },
  110.      *     inverseJoinColumns={
  111.      *          @ORM\JoinColumn(name="bonus_type_id", referencedColumnName="id")
  112.      *     }
  113.      * )
  114.      */
  115.     private Collection $bonusTypes;
  116.     /**
  117.      * @ORM\ManyToMany (
  118.      *     targetEntity="App\CasinoBundle\Entity\Currency",
  119.      *     inversedBy="newBonuses",
  120.      *     cascade={"persist"},
  121.      *     fetch="EXTRA_LAZY"
  122.      *     )
  123.      * @ORM\JoinTable(
  124.      *     name="new_bonus_currency",
  125.      *     joinColumns={
  126.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  127.      *     },
  128.      *     inverseJoinColumns={
  129.      *          @ORM\JoinColumn(name="currency_id", referencedColumnName="id")
  130.      *     }
  131.      * )
  132.      */
  133.     private Collection $currencies;
  134.     /**
  135.      * @ORM\ManyToMany (
  136.      *     targetEntity="App\CasinoBundle\Entity\Country",
  137.      *     inversedBy="newBonuses",
  138.      *     fetch="EXTRA_LAZY"
  139.      *     )
  140.      * @ORM\JoinTable(
  141.      *     name="new_bonus_country",
  142.      *     joinColumns={
  143.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  144.      *     },
  145.      *     inverseJoinColumns={
  146.      *          @ORM\JoinColumn(name="country_id", referencedColumnName="id")
  147.      *     }
  148.      * )
  149.      */
  150.     private Collection $countries;
  151.     /**
  152.      * @ORM\ManyToMany (
  153.      *     targetEntity="App\CasinoBundle\Entity\Slot",
  154.      *     inversedBy="newBonuses",
  155.      *     cascade={"persist"}
  156.      *     )
  157.      * @ORM\JoinTable(
  158.      *     name="new_bonus_slot",
  159.      *     joinColumns={
  160.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  161.      *     },
  162.      *     inverseJoinColumns={
  163.      *          @ORM\JoinColumn(name="slot_id", referencedColumnName="id")
  164.      *     }
  165.      * )
  166.      */
  167.     private Collection $slots;
  168.     /**
  169.      * @ORM\OneToMany(targetEntity="App\CasinoBundle\Entity\Alias", mappedBy="newBonus", cascade={"persist"}, orphanRemoval=true)
  170.      */
  171.     private Collection $aliases;
  172.     /**
  173.      * @var string|null
  174.      *
  175.      * @ORM\Column(
  176.      *     name="code",
  177.      *     type="string",
  178.      *     length=255,
  179.      *     nullable=true
  180.      *     )
  181.      */
  182.     private ?string $code null;
  183.     /**
  184.      * @var string|null
  185.      *
  186.      * @ORM\Column(
  187.      *     name="skin_bg",
  188.      *     type="string",
  189.      *     length=255,
  190.      *     nullable=true
  191.      *     )
  192.      */
  193.     private ?string $skinBg null;
  194.     /**
  195.      * @var string|null
  196.      *
  197.      * @ORM\Column(
  198.      *     name="skin_character",
  199.      *     type="string",
  200.      *     length=255,
  201.      *     nullable=true
  202.      *     )
  203.      */
  204.     private ?string $skinCharacter null;
  205.     /**
  206.      * @var string|null
  207.      *
  208.      * @ORM\Column(
  209.      *     name="original_bonus_url",
  210.      *     type="string",
  211.      *     length=255,
  212.      *     nullable=true
  213.      *     )
  214.      */
  215.     private ?string $originalBonusUrl;
  216.     /**
  217.      * @var string|null
  218.      *
  219.      * @ORM\Column(
  220.      *     name="label",
  221.      *     type="string",
  222.      *     length=255,
  223.      *     nullable=true
  224.      *     )
  225.      */
  226.     private ?string $label null;
  227.     /**
  228.      * @ORM\Column(
  229.      *     name="tnc_content",
  230.      *     type="text",
  231.      *     nullable=true
  232.      * )
  233.      */
  234.     private ?string $tncContent null;
  235.     /**
  236.      * @var bool
  237.      *
  238.      * @ORM\Column(
  239.      *     name="special_button_title",
  240.      *     type="boolean",
  241.      *     nullable=true
  242.      *     )
  243.      */
  244.     private ?bool $specialButtonTitle;
  245.     /**
  246.      * @var bool
  247.      *
  248.      * @ORM\Column(
  249.      *     name="animated_button",
  250.      *     type="boolean",
  251.      *     nullable=true
  252.      *     )
  253.      */
  254.     private ?bool $animatedButton;
  255.     /**
  256.      * @var bool
  257.      *
  258.      * @ORM\Column(
  259.      *     name="clone",
  260.      *     type="boolean",
  261.      *     nullable=false,
  262.      *     options={"default":"0"}
  263.      *     )
  264.      */
  265.     private ?bool $clone;
  266.     /**
  267.      * @var bool
  268.      *
  269.      * @ORM\Column(
  270.      *     name="copy_country_from_casino",
  271.      *     type="boolean",
  272.      *     nullable=true
  273.      *     )
  274.      */
  275.     private ?bool $copyCountryFromCasino;
  276.     /**
  277.      * @var bool
  278.      *
  279.      */
  280.     private bool $removeCountries false;
  281.     /**
  282.      * @var bool
  283.      *
  284.      * @ORM\Column(
  285.      *     name="add_all_sites",
  286.      *     type="boolean",
  287.      *     nullable=true,
  288.      *     options={"default":"0"}
  289.      *     )
  290.      */
  291.     private ?bool $addAllSites null;
  292.     /**
  293.      * @var int|null
  294.      *
  295.      * @ORM\Column(
  296.      *     name="deposit_min",
  297.      *     type="float",
  298.      *     nullable=true
  299.      * )
  300.      */
  301.     private ?float $depositMin;
  302.     /**
  303.      * @var string
  304.      *
  305.      * @ORM\Column(
  306.      *     name="wagering_requirements",
  307.      *     type="string",
  308.      *     length=255,
  309.      *     nullable=true
  310.      *     )
  311.      */
  312.     private ?string $wageringRequirements;
  313.     /**
  314.      * @var float|null
  315.      *
  316.      * @ORM\Column(
  317.      *     name="amount_max",
  318.      *     type="float",
  319.      *     nullable=true
  320.      *     )
  321.      */
  322.     private ?float $amountMax null;
  323.     /**
  324.      * @var integer|null
  325.      *
  326.      * @ORM\Column(
  327.      *     name="percent",
  328.      *     type="integer",
  329.      *     nullable=true
  330.      *     )
  331.      */
  332.     private ?int $percent null;
  333.     /**
  334.      * @var integer|null
  335.      *
  336.      * @ORM\Column(
  337.      *     name="free_spins",
  338.      *     type="integer",
  339.      *     nullable=true
  340.      *     )
  341.      */
  342.     private ?int $freeSpins null;
  343.     /**
  344.      * @var bool|null
  345.      *
  346.      * @ORM\Column(
  347.      *     name="cashable",
  348.      *     type="boolean",
  349.      *     nullable=true
  350.      *     )
  351.      */
  352.     private ?bool $cashable null;
  353.     /**
  354.      * @var DateTime|null
  355.      *
  356.      * @ORM\Column(
  357.      *     name="expired_date",
  358.      *     type="datetime",
  359.      *     nullable=true
  360.      *     )
  361.      */
  362.     private ?DateTime $expiredDate null;
  363.     /**
  364.      * @var DateTime|null
  365.      *
  366.      * @ORM\Column(
  367.      *     name="start_published_date",
  368.      *     type="datetime",
  369.      *     nullable=true
  370.      *     )
  371.      */
  372.     private ?DateTime $startPublishedDate;
  373.     /**
  374.      * @var DateTime|null
  375.      *
  376.      * @ORM\Column(
  377.      *     name="end_published_date",
  378.      *     type="datetime",
  379.      *     nullable=true
  380.      *     )
  381.      */
  382.     private ?DateTime $endPublishedDate;
  383.     /**
  384.      * @var string|null
  385.      *
  386.      * @ORM\Column(
  387.      *     name="terms_url",
  388.      *     type="string",
  389.      *     length=255,
  390.      *     nullable=true
  391.      *     )
  392.      */
  393.     private ?string $termsUrl null;
  394.     /**
  395.      * @var string|null
  396.      *
  397.      * @ORM\Column(
  398.      *     name="bonus_url",
  399.      *     type="string",
  400.      *     length=255,
  401.      *     nullable=true
  402.      *     )
  403.      */
  404.     private ?string $bonusUrl null;
  405.     /**
  406.      * @var string|null
  407.      *
  408.      * @ORM\Column(name="max_cashout", type="string", length=255, nullable=true)
  409.      */
  410.     protected ?string $maxCashout null;
  411.     /**
  412.      * @var string|null
  413.      *
  414.      * @ORM\Column(name="max_bet", type="string", length=255, nullable=true)
  415.      */
  416.     protected ?string $maxBet null;
  417.     /**
  418.      * @var string|null
  419.      *
  420.      * @ORM\Column(name="free_spins_conditions", type="string", length=255, nullable=true)
  421.      */
  422.     protected ?string $freeSpinsConditions null;
  423.     /**
  424.      * @var integer
  425.      *
  426.      * @ORM\Column(name="expires_after", type="integer", nullable=true)
  427.      */
  428.     private $expiresAfter;
  429.     /**
  430.      * @ORM\Column(type="boolean", nullable=false, options={"default" = false})
  431.      */
  432.     private bool $sponsored false;
  433.     /**
  434.      * @ORM\OneToMany(
  435.      *     targetEntity=BonusTag::class,
  436.      *     mappedBy="newBonus",
  437.      *     cascade={"persist"},
  438.      *     orphanRemoval=true
  439.      * )
  440.      */
  441.     private Collection $bonusTags;
  442.     /**
  443.      * @var int
  444.      *
  445.      * @ORM\Column(name="offer_type", type="integer", nullable=false, options={"default" = 0})
  446.      */
  447.     private int $offerType 0;
  448.     /**
  449.      * @var float
  450.      *
  451.      * @ORM\Column(name="bonus_generosity", type="float", nullable=false, options={"default" = 0})
  452.      */
  453.     private float $bonusGenerosity 0.0;
  454.     /**
  455.      * @var float
  456.      *
  457.      * @ORM\Column(name="summator", type="float", nullable=false, options={"default" = 0})
  458.      */
  459.     private float $summator 0.0;
  460.     /**
  461.      * @ORM\ManyToMany (
  462.      *     targetEntity="App\CmsBundle\Entity\Site",
  463.      *     inversedBy="newBonuses",
  464.      *     cascade={"persist"},
  465.      * )
  466.      * @ORM\JoinTable(
  467.      *     name="new_bonus_site",
  468.      *     joinColumns={
  469.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id")
  470.      *     },
  471.      *     inverseJoinColumns={
  472.      *          @ORM\JoinColumn(name="site_id", referencedColumnName="id")
  473.      *     }
  474.      * )
  475.      */
  476.     private Collection $sites;
  477.     /**
  478.      * @ORM\OneToMany(
  479.      *     targetEntity="App\CasinoBundle\Entity\IssueReport",
  480.      *     mappedBy="newBonus",
  481.      *     cascade={"persist"},
  482.      *     orphanRemoval=true
  483.      * )
  484.      */
  485.     private Collection $issueReports;
  486.     /**
  487.      * @ORM\OneToMany(
  488.      *     targetEntity="App\GamificationBundle\Entity\UserBonus",
  489.      *     mappedBy="bonus",
  490.      *     cascade={"persist", "remove"}
  491.      * )
  492.      */
  493.     private Collection $bonusOwnersUsers;
  494.     /**
  495.      * @ORM\OneToMany(
  496.      *     targetEntity="App\GamificationBundle\Entity\VisitorBonus",
  497.      *     mappedBy="bonus",
  498.      *     cascade={"persist", "remove"}
  499.      * )
  500.      */
  501.     private Collection $bonusOwnersVisitors;
  502.     /**
  503.      * @ORM\OneToMany(
  504.      *   targetEntity="App\CasinoBundle\Entity\BonusTitle",
  505.      *   mappedBy="bonus",
  506.      *   cascade={"persist","remove"},
  507.      *   orphanRemoval=true
  508.      * )
  509.      */
  510.     private Collection $titles;
  511.     /**
  512.      * @ORM\ManyToMany(
  513.      *     targetEntity="App\CasinoBundle\Entity\SportType",
  514.      *     inversedBy="newBonuses",
  515.      *     cascade={"persist"},
  516.      *     fetch="EXTRA_LAZY"
  517.      * )
  518.      * @ORM\JoinTable(
  519.      *     name="new_bonus_sport_type",
  520.      *     joinColumns={
  521.      *          @ORM\JoinColumn(name="new_bonus_id", referencedColumnName="id", onDelete="CASCADE")
  522.      *     },
  523.      *     inverseJoinColumns={
  524.      *          @ORM\JoinColumn(name="sport_type_id", referencedColumnName="id", onDelete="CASCADE")
  525.      *     }
  526.      * )
  527.      */
  528.     private Collection $sportTypes;
  529.     /**
  530.      * @var ?int
  531.      *
  532.      * @ORM\Column(name="price", type="integer", nullable=true)
  533.      */
  534.     private ?int $price null;
  535.     /**
  536.      * @ORM\Column(
  537.      *     name="group_type",
  538.      *     type="string",
  539.      *     length=16,
  540.      *     options={"default":"slot"}
  541.      * )
  542.      * @Assert\Choice(choices={"slot","betting"})
  543.      */
  544.     private string $groupType 'slot';
  545.     /**
  546.      * NewBonus constructor.
  547.      */
  548.     public function __construct()
  549.     {
  550.         $this->casino null;
  551.         $this->bonusTypes = new ArrayCollection();
  552.         $this->bonusCategories = new ArrayCollection();
  553.         $this->sites = new ArrayCollection();
  554.         $this->countries = new ArrayCollection();
  555.         $this->currencies = new ArrayCollection();
  556.         $this->slots = new ArrayCollection();
  557.         $this->aliases = new ArrayCollection();
  558.         $this->bonusTags = new ArrayCollection();
  559.         $this->issueReports = new ArrayCollection();
  560.         $this->bonusOwnersUsers = new ArrayCollection();
  561.         $this->bonusOwnersVisitors = new ArrayCollection();
  562.         $this->titles = new ArrayCollection();
  563.         $this->sportTypes = new ArrayCollection();
  564.     }
  565.     /**
  566.      * @return Casino|null
  567.      */
  568.     public function getCasino(): ?Casino
  569.     {
  570.         return $this->casino;
  571.     }
  572.     /**
  573.      * @param Casino $casino
  574.      * @return $this
  575.      */
  576.     public function setCasino(Casino $casino): self
  577.     {
  578.         $this->casino $casino;
  579.         return $this;
  580.     }
  581.     /**
  582.      * @return Collection|ArrayCollection|BonusType[]
  583.      */
  584.     public function getBonusTypes(): Collection
  585.     {
  586.         return $this->bonusTypes;
  587.     }
  588.     /**
  589.      * @param BonusType $bonusType
  590.      * @return $this
  591.      */
  592.     public function addBonusType(BonusType $bonusType): self
  593.     {
  594.         if (!$this->bonusTypes->contains($bonusType)) {
  595.             $this->bonusTypes[] = $bonusType;
  596.             $bonusType->addNewBonus($this);
  597.             $this->addCollectionLog(LogActionEnum::ADD'bonusType'$bonusType);
  598.         }
  599.         return $this;
  600.     }
  601.     /**
  602.      * @param BonusType $bonusType
  603.      * @return $this
  604.      */
  605.     public function removeBonusType(BonusType $bonusType): self
  606.     {
  607.         if ($this->bonusTypes->contains($bonusType)) {
  608.             $this->bonusTypes->removeElement($bonusType);
  609.             $bonusType->removeNewBonus($this);
  610.             $this->addCollectionLog(LogActionEnum::REMOVE'bonusType'$bonusType);
  611.         }
  612.         return $this;
  613.     }
  614.     /**
  615.      * @return Collection|BonusCategory[]
  616.      */
  617.     public function getBonusCategories(): Collection
  618.     {
  619.         return $this->bonusCategories;
  620.     }
  621.     /**
  622.      * @param BonusCategory $bonusCategory
  623.      * @return $this
  624.      */
  625.     public function addBonusCategory(BonusCategory $bonusCategory): self
  626.     {
  627.         if (!$this->bonusCategories->contains($bonusCategory)) {
  628.             $this->bonusCategories[] = $bonusCategory;
  629.             $bonusCategory->addNewBonus($this);
  630.             $this->addCollectionLog(LogActionEnum::ADD'bonusCategory'$bonusCategory);
  631.         }
  632.         return $this;
  633.     }
  634.     /**
  635.      * @param BonusCategory $bonusCategory
  636.      * @return $this
  637.      */
  638.     public function removeBonusCategory(BonusCategory $bonusCategory): self
  639.     {
  640.         if ($this->bonusCategories->contains($bonusCategory)) {
  641.             $this->bonusCategories->removeElement($bonusCategory);
  642.             $bonusCategory->removeNewBonus($this);
  643.             $this->addCollectionLog(LogActionEnum::REMOVE'bonusCategory'$bonusCategory);
  644.         }
  645.         return $this;
  646.     }
  647.     /**
  648.      * @return Collection|Currency[]
  649.      */
  650.     public function getCurrencies(): Collection
  651.     {
  652.         return $this->currencies;
  653.     }
  654.     /**
  655.      * @param Currency $currency
  656.      * @return $this
  657.      */
  658.     public function addCurrency(Currency $currency): self
  659.     {
  660.         if (!$this->currencies->contains($currency)) {
  661.             $this->currencies[] = $currency;
  662.             $currency->addNewBonus($this);
  663.             $this->addCollectionLog(LogActionEnum::ADD'currency'$currency);
  664.         }
  665.         return $this;
  666.     }
  667.     /**
  668.      * @param Currency $currency
  669.      * @return $this
  670.      */
  671.     public function removeCurrency(Currency $currency): self
  672.     {
  673.         if ($this->currencies->contains($currency)) {
  674.             $this->currencies->removeElement($currency);
  675.             $currency->removeNewBonus($this);
  676.             $this->addCollectionLog(LogActionEnum::REMOVE'currency'$currency);
  677.         }
  678.         return $this;
  679.     }
  680.     /**
  681.      * @return Collection
  682.      */
  683.     public function getSites(): Collection
  684.     {
  685.         return $this->sites;
  686.     }
  687.     /**
  688.      * @param Site $site
  689.      * @return $this
  690.      */
  691.     public function addSite(Site $site): self
  692.     {
  693.         if (!$this->sites->contains($site)) {
  694.             $this->sites[] = $site;
  695.             $site->addNewBonus($this);
  696.             $this->addCollectionLog(LogActionEnum::ADD'site'$site);
  697.         }
  698.         return $this;
  699.     }
  700.     /**
  701.      * @param Site $site
  702.      * @return $this
  703.      */
  704.     public function removeSite(Site $site): self
  705.     {
  706.         if ($this->sites->contains($site)) {
  707.             $this->sites->removeElement($site);
  708.             $site->removeNewBonus($this);
  709.             $this->addCollectionLog(LogActionEnum::REMOVE'site'$site);
  710.         }
  711.         return $this;
  712.     }
  713.     /**
  714.      * @return Collection|Country[]
  715.      */
  716.     public function getCountries(): Collection
  717.     {
  718.         return $this->countries;
  719.     }
  720.     /**
  721.      * @param Country $country
  722.      * @return $this
  723.      */
  724.     public function addCountry(Country $country): self
  725.     {
  726.         if (!$this->countries->contains($country)) {
  727.             $this->countries[] = $country;
  728.             $country->addNewBonus($this);
  729.             $this->addCollectionLog(LogActionEnum::ADD'country'$country);
  730.         }
  731.         return $this;
  732.     }
  733.     /**
  734.      * @param Country $country
  735.      * @return $this
  736.      */
  737.     public function removeCountry(Country $country): self
  738.     {
  739.         if ($this->countries->contains($country)) {
  740.             $this->countries->removeElement($country);
  741.             $country->removeNewBonus($this);
  742.             $this->addCollectionLog(LogActionEnum::REMOVE'country'$country);
  743.         }
  744.         return $this;
  745.     }
  746.     /**
  747.      * @return bool
  748.      */
  749.     public function getRemoveCountries(): bool
  750.     {
  751.         return $this->removeCountries;
  752.     }
  753.     /**
  754.      * @param bool $removeCountries
  755.      * @return NewBonus
  756.      */
  757.     public function setRemoveCountries(bool $removeCountries): self
  758.     {
  759.         $this->removeCountries $removeCountries;
  760.         return $this;
  761.     }
  762.     /**
  763.      * @return Collection|Slot[]
  764.      */
  765.     public function getSlots(): Collection
  766.     {
  767.         return $this->slots;
  768.     }
  769.     /**
  770.      * @param Slot $slot
  771.      * @return $this
  772.      */
  773.     public function addSlot(Slot $slot): self
  774.     {
  775.         if (!$this->slots->contains($slot)) {
  776.             $this->slots[] = $slot;
  777.             $slot->addNewBonus($this);
  778.             $this->addCollectionLog(LogActionEnum::ADD'slot'$slot);
  779.         }
  780.         return $this;
  781.     }
  782.     /**
  783.      * @param Slot $slot
  784.      * @return $this
  785.      */
  786.     public function removeSlot(Slot $slot): self
  787.     {
  788.         if ($this->slots->contains($slot)) {
  789.             $this->slots->removeElement($slot);
  790.             $slot->removeNewBonus($this);
  791.             $this->addCollectionLog(LogActionEnum::REMOVE'slot'$slot);
  792.         }
  793.         return $this;
  794.     }
  795.     /**
  796.      * @return Collection|IssueReport[]
  797.      */
  798.     public function getIssueReports()
  799.     {
  800.         return $this->issueReports;
  801.     }
  802.     /**
  803.      * @param IssueReport $issueReport
  804.      * @return $this
  805.      */
  806.     public function addIssueReport(IssueReport $issueReport): self
  807.     {
  808.         if (!$this->issueReports->contains($issueReport)) {
  809.             $this->issueReports[] = $issueReport;
  810.             $issueReport->setNewBonus($this);
  811.             $this->addCollectionLog(LogActionEnum::ADD'issueReport'$issueReport);
  812.         }
  813.         return $this;
  814.     }
  815.     /**
  816.      * @param IssueReport $issueReport
  817.      * @return $this
  818.      */
  819.     public function removeIssueReport(IssueReport $issueReport): self
  820.     {
  821.         if ($this->issueReports->contains($issueReport)) {
  822.             $this->issueReports->removeElement($issueReport);
  823.             $issueReport->setNewBonus(null);
  824.             $this->addCollectionLog(LogActionEnum::REMOVE'issueReport'$issueReport);
  825.         }
  826.         return $this;
  827.     }
  828.     /**
  829.      * @return string|null
  830.      */
  831.     public function getTncContent(): ?string
  832.     {
  833.         return $this->tncContent;
  834.     }
  835.     /**
  836.      * @param string|null $tncContent
  837.      * @return $this
  838.      */
  839.     public function setTncContent(?string $tncContent): self
  840.     {
  841.         $this->tncContent $tncContent;
  842.         return $this;
  843.     }
  844.     /**
  845.      * @return string|null
  846.      */
  847.     public function getCode(): ?string
  848.     {
  849.         return $this->code;
  850.     }
  851.     /**
  852.      * @param string|null $code
  853.      * @return $this
  854.      */
  855.     public function setCode(?string $code): self
  856.     {
  857.         $this->code $code;
  858.         return $this;
  859.     }
  860.     /**
  861.      * @return string|null
  862.      */
  863.     public function getSkinBg(): ?string
  864.     {
  865.         return $this->skinBg;
  866.     }
  867.     /**
  868.      * @param string|null $skinBg
  869.      * @return $this
  870.      */
  871.     public function setSkinBg(?string $skinBg): self
  872.     {
  873.         $this->skinBg $skinBg;
  874.         return $this;
  875.     }
  876.     /**
  877.      * @return string|null
  878.      */
  879.     public function getSkinCharacter(): ?string
  880.     {
  881.         return $this->skinCharacter;
  882.     }
  883.     /**
  884.      * @param string|null $skinCharacter
  885.      * @return $this
  886.      */
  887.     public function setSkinCharacter(?string $skinCharacter): self
  888.     {
  889.         $this->skinCharacter $skinCharacter;
  890.         return $this;
  891.     }
  892.     /**
  893.      * @return bool|null
  894.      */
  895.     public function getSpecialButtonTitle(): ?bool
  896.     {
  897.         return $this->specialButtonTitle;
  898.     }
  899.     /**
  900.      * @param bool|null $specialButtonTitle
  901.      * @return $this
  902.      */
  903.     public function setSpecialButtonTitle(?bool $specialButtonTitle): self
  904.     {
  905.         $this->specialButtonTitle $specialButtonTitle;
  906.         return $this;
  907.     }
  908.     /**
  909.      * @return bool|null
  910.      */
  911.     public function getAnimatedButton(): ?bool
  912.     {
  913.         return $this->animatedButton;
  914.     }
  915.     /**
  916.      * @param bool|null $animatedButton
  917.      * @return $this
  918.      */
  919.     public function setAnimatedButton(?bool $animatedButton): self
  920.     {
  921.         $this->animatedButton $animatedButton;
  922.         return $this;
  923.     }
  924.     /**
  925.      * @return bool
  926.      */
  927.     public function getClone(): bool
  928.     {
  929.         return $this->clone;
  930.     }
  931.     /**
  932.      * @param bool|null $clone
  933.      * @return $this
  934.      */
  935.     public function setClone(bool $clone): self
  936.     {
  937.         $this->clone $clone;
  938.         return $this;
  939.     }
  940.     /**
  941.      * @return bool|null
  942.      */
  943.     public function getCopyCountryFromCasino(): ?bool
  944.     {
  945.         return $this->copyCountryFromCasino;
  946.     }
  947.     /**
  948.      * @param bool|null $copyCountryFromCasino
  949.      * @return $this
  950.      */
  951.     public function setCopyCountryFromCasino(?bool $copyCountryFromCasino): self
  952.     {
  953.         $this->copyCountryFromCasino $copyCountryFromCasino;
  954.         return $this;
  955.     }
  956.     /**
  957.      * @return bool|null
  958.      */
  959.     public function getAddAllSites(): ?bool
  960.     {
  961.         return $this->addAllSites;
  962.     }
  963.     /**
  964.      * @param bool|null $addAllSites
  965.      * @return $this
  966.      */
  967.     public function setAddAllSites(?bool $addAllSites): self
  968.     {
  969.         $this->addAllSites $addAllSites;
  970.         return $this;
  971.     }
  972.     /**
  973.      * @return float|null
  974.      */
  975.     public function getDepositMin(): ?float
  976.     {
  977.         return $this->depositMin;
  978.     }
  979.     /**
  980.      * @param float|null $depositMin
  981.      * @return $this
  982.      */
  983.     public function setDepositMin(?float $depositMin): self
  984.     {
  985.         $this->depositMin $depositMin;
  986.         return $this;
  987.     }
  988.     /**
  989.      * @return string|null
  990.      */
  991.     public function getWageringRequirements(): ?string
  992.     {
  993.         return $this->wageringRequirements;
  994.     }
  995.     /**
  996.      * @param string|null $wageringRequirements
  997.      * @return $this
  998.      */
  999.     public function setWageringRequirements(?string $wageringRequirements): self
  1000.     {
  1001.         $this->wageringRequirements $wageringRequirements;
  1002.         return $this;
  1003.     }
  1004.     /**
  1005.      * @return int|null
  1006.      */
  1007.     public function getFreeSpins(): ?int
  1008.     {
  1009.         return $this->freeSpins;
  1010.     }
  1011.     /**
  1012.      * @param int|null $freeSpins
  1013.      * @return $this
  1014.      */
  1015.     public function setFreeSpins(?int $freeSpins): self
  1016.     {
  1017.         $this->freeSpins $freeSpins;
  1018.         return $this;
  1019.     }
  1020.     /**
  1021.      * @return int|null
  1022.      */
  1023.     public function getPercent(): ?int
  1024.     {
  1025.         return $this->percent;
  1026.     }
  1027.     /**
  1028.      * @param int|null $percent
  1029.      * @return $this
  1030.      */
  1031.     public function setPercent(?int $percent): self
  1032.     {
  1033.         $this->percent $percent;
  1034.         return $this;
  1035.     }
  1036.     /**
  1037.      * @return float|null
  1038.      */
  1039.     public function getAmountMax(): ?float
  1040.     {
  1041.         return $this->amountMax;
  1042.     }
  1043.     /**
  1044.      * @param float|null $amountMax
  1045.      * @return $this
  1046.      */
  1047.     public function setAmountMax(?float $amountMax): self
  1048.     {
  1049.         $this->amountMax $amountMax;
  1050.         return $this;
  1051.     }
  1052.     /**
  1053.      * @return bool|null
  1054.      */
  1055.     public function getCashable(): ?bool
  1056.     {
  1057.         return $this->cashable;
  1058.     }
  1059.     /**
  1060.      * @param bool|null $cashable
  1061.      * @return $this
  1062.      */
  1063.     public function setCashable(?bool $cashable): self
  1064.     {
  1065.         $this->cashable $cashable;
  1066.         return $this;
  1067.     }
  1068.     /**
  1069.      * @return string|null
  1070.      */
  1071.     public function getTermsUrl(): ?string
  1072.     {
  1073.         return $this->termsUrl;
  1074.     }
  1075.     /**
  1076.      * @param string|null $termsUrl
  1077.      * @return $this
  1078.      */
  1079.     public function setTermsUrl(?string $termsUrl): self
  1080.     {
  1081.         $this->termsUrl $termsUrl;
  1082.         return $this;
  1083.     }
  1084.     /**
  1085.      * @return string|null
  1086.      */
  1087.     public function getBonusUrl(): ?string
  1088.     {
  1089.         return $this->bonusUrl;
  1090.     }
  1091.     /**
  1092.      * @param string|null $bonusUrl
  1093.      * @return $this
  1094.      */
  1095.     public function setBonusUrl(?string $bonusUrl): self
  1096.     {
  1097.         $this->bonusUrl $bonusUrl;
  1098.         return $this;
  1099.     }
  1100.     /**
  1101.      * @return string|null
  1102.      */
  1103.     public function getOriginalBonusUrl(): ?string
  1104.     {
  1105.         return $this->originalBonusUrl;
  1106.     }
  1107.     /**
  1108.      * @param string|null $originalBonusUrl
  1109.      * @return $this
  1110.      */
  1111.     public function setOriginalBonusUrl(?string $originalBonusUrl): self
  1112.     {
  1113.         $this->originalBonusUrl $originalBonusUrl;
  1114.         return $this;
  1115.     }
  1116.     /**
  1117.      * @return string|null
  1118.      */
  1119.     public function getLabel(): ?string
  1120.     {
  1121.         return $this->label;
  1122.     }
  1123.     /**
  1124.      * @param string|null $label
  1125.      * @return $this
  1126.      */
  1127.     public function setLabel(?string $label): self
  1128.     {
  1129.         $this->label $label;
  1130.         return $this;
  1131.     }
  1132.     /**
  1133.      * @return DateTime|null
  1134.      */
  1135.     public function getExpiredDate(): ?DateTime
  1136.     {
  1137.         return $this->expiredDate;
  1138.     }
  1139.     /**
  1140.      * @param DateTime|null $expiredDate
  1141.      * @return $this
  1142.      */
  1143.     public function setExpiredDate(?DateTime $expiredDate): self
  1144.     {
  1145.         $this->expiredDate $expiredDate;
  1146.         return $this;
  1147.     }
  1148.     /**
  1149.      * @return DateTime|null
  1150.      */
  1151.     public function getStartPublishedDate(): ?DateTime
  1152.     {
  1153.         return $this->startPublishedDate;
  1154.     }
  1155.     /**
  1156.      * @param DateTime|null $startPublishedDate
  1157.      * @return $this
  1158.      */
  1159.     public function setStartPublishedDate(?DateTime $startPublishedDate): self
  1160.     {
  1161.         $this->startPublishedDate $startPublishedDate;
  1162.         return $this;
  1163.     }
  1164.     /**
  1165.      * @return DateTime|null
  1166.      */
  1167.     public function getEndPublishedDate(): ?DateTime
  1168.     {
  1169.         return $this->endPublishedDate;
  1170.     }
  1171.     /**
  1172.      * @param DateTime|null $endPublishedDate
  1173.      * @return $this
  1174.      */
  1175.     public function setEndPublishedDate(?DateTime $endPublishedDate): self
  1176.     {
  1177.         $this->endPublishedDate $endPublishedDate;
  1178.         return $this;
  1179.     }
  1180.     /**
  1181.      * @return $this
  1182.      * @deprecated
  1183.      */
  1184.     public function setCache(): self
  1185.     {
  1186.         /* do not use this method. functionality moved to db side */
  1187.         /** @var Country $country */
  1188.         $this->cache json_encode([
  1189.             'currency' => ($currencies $this->getCurrencies()) ? array_map(function ($currency) {
  1190.                 return $currency->getAlphabeticCode();
  1191.             }, $currencies->toArray()) : null,
  1192.             'bonusTypes' => ($bonuses $this->getBonusTypes()) ? array_map(function ($bonus) {
  1193.                 return ['name' => $bonus->getName(), 'slug' => $bonus->getSlug()];
  1194.             }, $bonuses->toArray()) : null,
  1195.             'slots' => ($slots $this->getSlots()) ? array_map(function ($slot) {
  1196.                 return ['name' => $slot->getName(), 'slug' => $slot->getSlug()];
  1197.             }, $slots->toArray()) : null,
  1198.             'bonusCategories' => ($categories $this->getBonusCategories()) ? array_map(function ($category) {
  1199.                 return ['name' => $category->getName(), 'slug' => $category->getSlug(), 'type' => ($type $category->getBonusType()) ? $category->getBonusType()->getSlug() : null];
  1200.             }, $categories->toArray()) : null,
  1201.             'casinoRestrictedCountries' => ($restrictedCountries $this->getCasino()->getRestrictedCountriesFact()) ? array_map(function ($country) {
  1202.                 return $country->getAlpha2();
  1203.             }, $restrictedCountries->toArray()) : null,
  1204.             'affiliateUrl' => $this->getCasino()->getInfo()->getAffiliateUrl(),
  1205.         ]);
  1206.         return $this;
  1207.     }
  1208.     /**
  1209.      * @return string
  1210.      */
  1211.     public function getTitleShort(): ?string
  1212.     {
  1213.         return $this->titleShort;
  1214.     }
  1215.     /**
  1216.      * @param string|null $titleShort
  1217.      * @return $this
  1218.      */
  1219.     public function setTitleShort(?string $titleShort): self
  1220.     {
  1221.         $this->titleShort $titleShort;
  1222.         return $this;
  1223.     }
  1224.     /**
  1225.      * @return string
  1226.      */
  1227.     public function getMaxCashout(): ?string
  1228.     {
  1229.         return $this->maxCashout;
  1230.     }
  1231.     public function setMaxCashout(?string $maxCashout): self
  1232.     {
  1233.         $this->maxCashout $maxCashout;
  1234.         return $this;
  1235.     }
  1236.     /**
  1237.      * @return string
  1238.      */
  1239.     public function getMaxBet(): ?string
  1240.     {
  1241.         return $this->maxBet;
  1242.     }
  1243.     public function setMaxBet(?string $maxBet): self
  1244.     {
  1245.         $this->maxBet $maxBet;
  1246.         return $this;
  1247.     }
  1248.     /**
  1249.      * @return string
  1250.      */
  1251.     public function getFreeSpinsConditions(): ?string
  1252.     {
  1253.         return $this->freeSpinsConditions;
  1254.     }
  1255.     public function setFreeSpinsConditions(?string $freeSpinsConditions): self
  1256.     {
  1257.         $this->freeSpinsConditions $freeSpinsConditions;
  1258.         return $this;
  1259.     }
  1260.     public function getExpiresAfter(): ?int
  1261.     {
  1262.         return $this->expiresAfter;
  1263.     }
  1264.     public function setExpiresAfter(?int $expiresAfter): self
  1265.     {
  1266.         $this->expiresAfter $expiresAfter;
  1267.         return $this;
  1268.     }
  1269.     public function getName(): string
  1270.     {
  1271.         return $this->getTitleShort();
  1272.     }
  1273.     /**
  1274.      * @param bool $sponsored
  1275.      * @return self
  1276.      */
  1277.     public function setSponsored(bool $sponsored): self
  1278.     {
  1279.         $this->sponsored $sponsored;
  1280.         return $this;
  1281.     }
  1282.     /**
  1283.      * @return ?bool
  1284.      */
  1285.     public function getSponsored(): ?bool
  1286.     {
  1287.         return $this->sponsored;
  1288.     }
  1289.     /**
  1290.      * @return ?int
  1291.      */
  1292.     public function getOfferType(): ?int
  1293.     {
  1294.         return $this->offerType;
  1295.     }
  1296.     /**
  1297.      * @param ?int $type
  1298.      * @return $this
  1299.      */
  1300.     public function setOfferType(?int $type): self
  1301.     {
  1302.         BonusOfferTypeEnum::assertExists($type);
  1303.         $this->offerType $type;
  1304.         return $this;
  1305.     }
  1306.     /**
  1307.      * @return Collection
  1308.      */
  1309.     public function getBonusTags(): Collection
  1310.     {
  1311.         return $this->bonusTags;
  1312.     }
  1313.     /**
  1314.      * @return int
  1315.      */
  1316.     public function getBonusTagsCount(): int
  1317.     {
  1318.         return $this->bonusTags->count();
  1319.     }
  1320.     /**
  1321.      * @param BonusTag $bonusTag
  1322.      * @return $this
  1323.      */
  1324.     public function addBonusTag(BonusTag $bonusTag): self
  1325.     {
  1326.         if (!$this->bonusTags->contains($bonusTag)) {
  1327.             $this->bonusTags[] = $bonusTag;
  1328.             $bonusTag->setNewBonus($this);
  1329.         }
  1330.         return $this;
  1331.     }
  1332.     /**
  1333.      * @param BonusTag $bonusTag
  1334.      * @return $this
  1335.      */
  1336.     public function removeBonusTag(BonusTag $bonusTag): self
  1337.     {
  1338.         if ($this->bonusTags->contains($bonusTag)) {
  1339.             $this->bonusTags->removeElement($bonusTag);
  1340.         }
  1341.         return $this;
  1342.     }
  1343.     /**
  1344.      * @return float
  1345.      */
  1346.     public function getBonusGenerosity(): float
  1347.     {
  1348.         return $this->bonusGenerosity;
  1349.     }
  1350.     /**
  1351.      * @param float $bonusGenerosity
  1352.      * @return $this
  1353.      */
  1354.     public function setBonusGenerosity(float $bonusGenerosity): self
  1355.     {
  1356.         $this->bonusGenerosity $bonusGenerosity;
  1357.         return $this;
  1358.     }
  1359.     /**
  1360.      * @return float
  1361.      */
  1362.     public function getSummator(): float
  1363.     {
  1364.         return $this->summator;
  1365.     }
  1366.     /**
  1367.      * @param float $summator
  1368.      * @return $this
  1369.      */
  1370.     public function setSummator(float $summator): self
  1371.     {
  1372.         $this->summator $summator;
  1373.         return $this;
  1374.     }
  1375.     /**
  1376.      * @return Collection
  1377.      */
  1378.     public function getBonusOwnersUsers(): Collection
  1379.     {
  1380.         return $this->bonusOwnersUsers;
  1381.     }
  1382.     /**
  1383.      * @param UserBonus $userBonus
  1384.      * @return $this
  1385.      */
  1386.     public function addBonusOwnerUser(UserBonus $userBonus): self
  1387.     {
  1388.         if (!$this->bonusOwnersUsers->contains($userBonus)) {
  1389.             $this->bonusOwnersUsers[] = $userBonus;
  1390.             $userBonus->setBonus($this);
  1391.         }
  1392.         return $this;
  1393.     }
  1394.     /**
  1395.      * @param UserBonus $userBonus
  1396.      * @return $this
  1397.      */
  1398.     public function removeBonusOwnerUser(UserBonus $userBonus): self
  1399.     {
  1400.         if ($this->bonusOwnersUsers->removeElement($userBonus)) {
  1401.             if ($userBonus->getBonus() === $this) {
  1402.                 $userBonus->setBonus(null);
  1403.             }
  1404.         }
  1405.         return $this;
  1406.     }
  1407.     /**
  1408.      * @return Collection
  1409.      */
  1410.     public function getBonusOwnersVisitors(): Collection
  1411.     {
  1412.         return $this->bonusOwnersVisitors;
  1413.     }
  1414.     /**
  1415.      * @param VisitorBonus $VisitorBonus
  1416.      * @return $this
  1417.      */
  1418.     public function addBonusOwnerVisitor(VisitorBonus $VisitorBonus): self
  1419.     {
  1420.         if (!$this->bonusOwnersVisitors->contains($VisitorBonus)) {
  1421.             $this->bonusOwnersVisitors[] = $VisitorBonus;
  1422.             $VisitorBonus->setBonus($this);
  1423.         }
  1424.         return $this;
  1425.     }
  1426.     /**
  1427.      * @param VisitorBonus $VisitorBonus
  1428.      * @return $this
  1429.      */
  1430.     public function removeBonusOwnerVisitor(VisitorBonus $VisitorBonus): self
  1431.     {
  1432.         if ($this->bonusOwnersVisitors->removeElement($VisitorBonus)) {
  1433.             if ($VisitorBonus->getBonus() === $this) {
  1434.                 $VisitorBonus->setBonus(null);
  1435.             }
  1436.         }
  1437.         return $this;
  1438.     }
  1439.     /**
  1440.      * @return ?int
  1441.      */
  1442.     public function getPrice(): ?int
  1443.     {
  1444.         return $this->price;
  1445.     }
  1446.     /**
  1447.      * @param ?int $price
  1448.      * @return $this
  1449.      */
  1450.     public function setPrice(?int $price): self
  1451.     {
  1452.         $this->price $price;
  1453.         return $this;
  1454.     }
  1455.     /**
  1456.      * @return Collection
  1457.      */
  1458.     public function getTitles(): Collection
  1459.     {
  1460.         return $this->titles;
  1461.     }
  1462.     /**
  1463.      * @param BonusTitle $bonusTitle
  1464.      * @return $this
  1465.      */
  1466.     public function addTitle(BonusTitle $bonusTitle): self
  1467.     {
  1468.         if (!$this->titles->contains($bonusTitle)) {
  1469.             $this->titles->add($bonusTitle);
  1470.             $bonusTitle->setBonus($this);
  1471.         }
  1472.         return $this;
  1473.     }
  1474.     /**
  1475.      * @param BonusTitle $bonusTitle
  1476.      * @return $this
  1477.      */
  1478.     public function removeTitle(BonusTitle $bonusTitle): self
  1479.     {
  1480.         if ($this->titles->removeElement($bonusTitle) && $bonusTitle->getBonus() === $this) {
  1481.             $bonusTitle->setBonus(null);
  1482.         }
  1483.         return $this;
  1484.     }
  1485.     /**
  1486.      * @return Collection
  1487.      */
  1488.     public function getSportTypes(): Collection
  1489.     {
  1490.         return $this->sportTypes;
  1491.     }
  1492.     /**
  1493.      * @param SportType $sportType
  1494.      * @return $this
  1495.      */
  1496.     public function addSportType(SportType $sportType): self
  1497.     {
  1498.         if (!$this->sportTypes->contains($sportType)) {
  1499.             $this->sportTypes[] = $sportType;
  1500.             if (method_exists($sportType'addNewBonus')) {
  1501.                 $sportType->addNewBonus($this);
  1502.             }
  1503.         }
  1504.         return $this;
  1505.     }
  1506.     /**
  1507.      * @param SportType $sportType
  1508.      * @return $this
  1509.      */
  1510.     public function removeSportType(SportType $sportType): self
  1511.     {
  1512.         if ($this->sportTypes->contains($sportType)) {
  1513.             $this->sportTypes->removeElement($sportType);
  1514.             if (method_exists($sportType'removeNewBonus')) {
  1515.                 $sportType->removeNewBonus($this);
  1516.             }
  1517.         }
  1518.         return $this;
  1519.     }
  1520.     /**
  1521.      * @return string
  1522.      */
  1523.     public function getGroupType(): string
  1524.     {
  1525.         return $this->groupType;
  1526.     }
  1527.     /**
  1528.      * @param string $groupType
  1529.      * @return $this
  1530.      */
  1531.     public function setGroupType(string $groupType): self
  1532.     {
  1533.         $this->groupType $groupType;
  1534.         return $this;
  1535.     }
  1536. }