src/CasinoBundle/Entity/Slot.php line 41

Open in your IDE?
  1. <?php
  2. namespace App\CasinoBundle\Entity;
  3. use App\CmsBundle\Entity\LogInterface;
  4. use App\CmsBundle\Entity\LogTrait;
  5. use App\CmsBundle\Entity\PublishedTrait;
  6. use App\CmsBundle\Entity\Site;
  7. use App\CmsBundle\Entity\SlugTrait;
  8. use App\CmsBundle\Entity\IdTrait;
  9. use App\CmsBundle\Enum\LogActionEnum;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use App\CmsBundle\Entity\TimeStampedTrait;
  14. use DateTime;
  15. /**
  16.  * Slot
  17.  *
  18.  * @ORM\Table(
  19.  *     name="slot",
  20.  *     indexes={
  21.  *         @ORM\Index(name="slot_published_index", columns={"published"}),
  22.  *         @ORM\Index(name="slot_layout_index", columns={"layout"}),
  23.  *         @ORM\Index(name="slot_enable_game_index", columns={"enable_game"})
  24.  *     },
  25.  *     uniqueConstraints={
  26.  *         @ORM\UniqueConstraint(name="slot_slug_uindex", columns={"slug"})
  27.  *     }
  28.  * )
  29.  * @ORM\Entity(
  30.  *     repositoryClass="App\CasinoBundle\Repository\SlotRepository"
  31.  * )
  32.  * @ORM\HasLifecycleCallbacks()
  33.  * @ORM\Cache(
  34.  *     usage="NONSTRICT_READ_WRITE",
  35.  *     region="one_day"
  36.  * )
  37.  */
  38. class Slot implements LogInterface
  39. {
  40.     use IdTraitNameTraitTimeStampedTraitAliasTraitSlugTraitAliasTraitSlotcatalogIdTraitPublishedTraitLogTrait;
  41.     /**
  42.      * @ORM\Column(
  43.      *     type="text",
  44.      *     nullable=true
  45.      * )
  46.      */
  47.     private $info;
  48.     /**
  49.      * @var Software|null
  50.      * @ORM\ManyToOne(
  51.      *     targetEntity="Software",
  52.      *     inversedBy="slots"
  53.      * )
  54.      * @ORM\JoinColumn(
  55.      *     name="software_id",
  56.      *     referencedColumnName="id",
  57.      *     nullable=true
  58.      * )
  59.      */
  60.     private $software;
  61.     /**
  62.      * @var GameType|null
  63.      * @ORM\ManyToOne(
  64.      *     targetEntity="GameType",
  65.      *     inversedBy="slots"
  66.      * )
  67.      * @ORM\JoinColumn(
  68.      *     name="game_type_id",
  69.      *     referencedColumnName="id",
  70.      *     nullable=true
  71.      * )
  72.      */
  73.     private $gameType;
  74.     /**
  75.      * @ORM\Column(
  76.      *     type="float",
  77.      *     nullable=true
  78.      * )
  79.      */
  80.     private $rtp;
  81.     /**
  82.      * @ORM\OneToMany(
  83.      *     targetEntity="App\CasinoBundle\Entity\SlotScreenshot",
  84.      *     mappedBy="slot",
  85.      *     cascade={"persist"},
  86.      *     orphanRemoval=true
  87.      * )
  88.      * @ORM\OrderBy(
  89.      *     {"position" = "ASC"}
  90.      * )
  91.      */
  92.     private $slotScreenshots;
  93.     /**
  94.      * @ORM\OneToMany(
  95.      *     targetEntity="App\CasinoBundle\Entity\SlotCasinoGeo",
  96.      *     mappedBy="slot",
  97.      *     cascade={"persist"},
  98.      *     orphanRemoval=true
  99.      * )
  100.      */
  101.     private $slotCasinosGeos;
  102.     /**
  103.      * @ORM\ManyToMany(
  104.      *     targetEntity="SlotTag",
  105.      *     inversedBy="slots",
  106.      *     cascade={"persist"}
  107.      * )
  108.      */
  109.     private $slotTags;
  110.     /**
  111.      * @ORM\ManyToMany(
  112.      *     targetEntity="SlotFeature",
  113.      *     inversedBy="slots",
  114.      *     cascade={"persist"}
  115.      * )
  116.      */
  117.     private $slotFeatures;
  118.     /**
  119.      * @ORM\ManyToMany(
  120.      *     targetEntity="SlotTheme",
  121.      *     fetch="EXTRA_LAZY",
  122.      *     inversedBy="slots",
  123.      *     cascade={"persist"}
  124.      * )
  125.      */
  126.     private $slotThemes;
  127.     /**
  128.      * @ORM\ManyToMany(
  129.      *     targetEntity="SlotDevice",
  130.      *     inversedBy="slots",
  131.      *     cascade={"persist"}
  132.      * )
  133.      */
  134.     private $slotDevices;
  135.     /**
  136.      * @var DateTime
  137.      *
  138.      * @ORM\Column(
  139.      *     type="datetime",
  140.      *     nullable=true)
  141.      */
  142.     private $release;
  143.     /**
  144.      * @ORM\Column(
  145.      *     name="min_bet",
  146.      *     type="float",
  147.      *     nullable=true
  148.      * )
  149.      */
  150.     private $minBet;
  151.     /**
  152.      * @ORM\Column(
  153.      *     name="max_bet",
  154.      *     type="float",
  155.      *     nullable=true
  156.      * )
  157.      */
  158.     private $maxBet;
  159.     /**
  160.      * @ORM\Column(
  161.      *     type="integer",
  162.      *     nullable=true
  163.      * )
  164.      */
  165.     private $type;
  166.     /**
  167.      * @ORM\Column(
  168.      *     type="string",
  169.      *     length=255,
  170.      *     nullable=true
  171.      * )
  172.      */
  173.     private $videoUrl;
  174.     /**
  175.      * @ORM\Column(
  176.      *     type="integer",
  177.      *     nullable=true
  178.      * )
  179.      */
  180.     private $rank;
  181.     /**
  182.      * @ORM\Column(
  183.      *     type="integer",
  184.      *     nullable=true
  185.      * )
  186.      */
  187.     private $paylines;
  188.     /**
  189.      * @ORM\Column(
  190.      *     type="string",
  191.      *     length=255,
  192.      *     nullable=true
  193.      * )
  194.      */
  195.     private $layout;
  196.     /**
  197.      * @ORM\Column(
  198.      *     type="string",
  199.      *     length=255,
  200.      *     nullable=true
  201.      * )
  202.      */
  203.     private $technology;
  204.     /**
  205.      * @ORM\Column(
  206.      *     type="string",
  207.      *     length=255,
  208.      *     nullable=true
  209.      * )
  210.      */
  211.     private $variance;
  212.     /**
  213.      * @ORM\Column(
  214.      *     type="integer",
  215.      *     nullable=true
  216.      * )
  217.      */
  218.     private $maxWin;
  219.     /**
  220.      * @ORM\Column(
  221.      *     type="text",
  222.      *     nullable=true
  223.      * )
  224.      */
  225.     private $source;
  226.     /**
  227.      * @ORM\Column(
  228.      *     type="string",
  229.      *     length=255,
  230.      *     nullable=true
  231.      * )
  232.      */
  233.     private $galleryHash;
  234.     /**
  235.      * @ORM\Column(
  236.      *     type="string",
  237.      *     length=255,
  238.      *     nullable=true
  239.      * )
  240.      */
  241.     private $dataHash;
  242.     /**
  243.      * @ORM\Column(
  244.      *     type="boolean",
  245.      *     nullable=false,
  246.      *     options={"default" = false}
  247.      * )
  248.      */
  249.     private $enableGame false;
  250.     /**
  251.      * @ORM\OneToMany(
  252.      *     targetEntity="App\CasinoBundle\Entity\Alias",
  253.      *     mappedBy="slot",
  254.      *     cascade={"persist"},
  255.      *     orphanRemoval=true
  256.      * )
  257.      */
  258.     private Collection $aliases;
  259.     /**
  260.      * @ORM\Column(
  261.      *     type="text",
  262.      *     nullable=true
  263.      * )
  264.      */
  265.     private $countries;
  266.     /**
  267.      * @ORM\ManyToMany(
  268.      *     targetEntity="App\CasinoBundle\Entity\Casino",
  269.      *     mappedBy="slots"
  270.      * )
  271.      */
  272.     private $casinos;
  273.     /**
  274.      * @ORM\ManyToMany(
  275.      *     targetEntity="App\CmsBundle\Entity\Site",
  276.      *     fetch="EXTRA_LAZY",
  277.      *     cascade={"persist"}
  278.      * )
  279.      * @ORM\JoinTable(
  280.      *     name="slot_site",
  281.      *     joinColumns={
  282.      *          @ORM\JoinColumn(name="slot_id", referencedColumnName="id")
  283.      *     },
  284.      *     inverseJoinColumns={
  285.      *          @ORM\JoinColumn(name="site_id", referencedColumnName="id")
  286.      *     }
  287.      * )
  288.      */
  289.     protected Collection $sites;
  290.     /**
  291.      * @ORM\ManyToMany(
  292.      *     targetEntity="App\CasinoBundle\Entity\NewBonus",
  293.      *     mappedBy="slots",
  294.      *     cascade={"persist"}
  295.      * )
  296.      */
  297.     private Collection $newBonuses;
  298.     /**
  299.      * @ORM\OneToMany(
  300.      *     targetEntity="App\CasinoBundle\Entity\IssueReport",
  301.      *     mappedBy="slot",
  302.      * )
  303.      */
  304.     private Collection $issueReports;
  305.     public function __construct()
  306.     {
  307.         $this->slotTags = new ArrayCollection();
  308.         $this->slotScreenshots = new ArrayCollection();
  309.         $this->slotCasinosGeos = new ArrayCollection();
  310.         $this->slotThemes = new ArrayCollection();
  311.         $this->slotFeatures = new ArrayCollection();
  312.         $this->slotDevices = new ArrayCollection();
  313.         $this->aliases = new ArrayCollection();
  314.         $this->sites = new ArrayCollection();
  315.         $this->casinos = new ArrayCollection();
  316.         $this->newBonuses = new ArrayCollection();
  317.         $this->issueReports = new ArrayCollection();
  318.     }
  319.     public function __toString(): string
  320.     {
  321.         return $this->name;
  322.     }
  323.     public function getCountries(): ?string
  324.     {
  325.         return $this->countries;
  326.     }
  327.     public function setCountries(?string $countries null): self
  328.     {
  329.         $this->countries $countries;
  330.         return $this;
  331.     }
  332.     public function getNameWithSoftware(): ?string
  333.     {
  334.         $software = ($this->software)
  335.             ? ' - ' $this->software->getName()
  336.             : '';
  337.         return $this->getName() . $software;
  338.     }
  339.     public function getNameWithSlugAndSoftware(): ?string
  340.     {
  341.         $software = ($this->software)
  342.             ? ' - ' $this->software->getName()
  343.             : '';
  344.         return $this->getName() . ' (' $this->getSlug() . ') ' $software;
  345.     }
  346.     public function getSoftware(): ?Software
  347.     {
  348.         return $this->software;
  349.     }
  350.     public function setSoftware(?Software $software): self
  351.     {
  352.         $this->software $software;
  353.         return $this;
  354.     }
  355.     public function getGameType(): ?GameType
  356.     {
  357.         return $this->gameType;
  358.     }
  359.     public function setGameType(?GameType $gameType): self
  360.     {
  361.         $this->gameType $gameType;
  362.         if ($gameType) {
  363.             $gameType->addSlot($this);
  364.         } else {
  365.             $gameType->removeSlot($this);
  366.         }
  367.         return $this;
  368.     }
  369.     public function getRtp(): ?float
  370.     {
  371.         return $this->rtp;
  372.     }
  373.     public function setRtp($rtp): self
  374.     {
  375.         $this->rtp = ($rtp) ? floatval($rtp) : null;
  376.         return $this;
  377.     }
  378.     public function getInfo(): ?string
  379.     {
  380.         return $this->info;
  381.     }
  382.     public function setInfo(?string $info): self
  383.     {
  384.         $this->info $info;
  385.         return $this;
  386.     }
  387.     public function getRelease(): ?DateTime
  388.     {
  389.         return $this->release;
  390.     }
  391.     public function setRelease(?DateTime $release): self
  392.     {
  393.         $this->release $release;
  394.         return $this;
  395.     }
  396.     public function getMinBet(): ?float
  397.     {
  398.         return $this->minBet;
  399.     }
  400.     public function setMinBet(?float $minBet): self
  401.     {
  402.         $this->minBet $minBet;
  403.         return $this;
  404.     }
  405.     public function getMaxBet(): ?float
  406.     {
  407.         return $this->maxBet;
  408.     }
  409.     public function setMaxBet(?float $maxBet): self
  410.     {
  411.         $this->maxBet $maxBet;
  412.         return $this;
  413.     }
  414.     public function setType(?int $type): self
  415.     {
  416.         $this->type $type;
  417.         return $this;
  418.     }
  419.     public function getType(): ?int
  420.     {
  421.         return $this->type;
  422.     }
  423.     public function getVideoUrl(): ?string
  424.     {
  425.         return $this->videoUrl;
  426.     }
  427.     public function setVideoUrl(?string $videoUrl): self
  428.     {
  429.         $this->videoUrl $videoUrl;
  430.         return $this;
  431.     }
  432.     public function getRank(): ?int
  433.     {
  434.         return $this->rank;
  435.     }
  436.     public function setRank(?int $rank): self
  437.     {
  438.         $this->rank $rank;
  439.         return $this;
  440.     }
  441.     public function getPaylines(): ?int
  442.     {
  443.         return $this->paylines;
  444.     }
  445.     public function setPaylines(?int $paylines): self
  446.     {
  447.         $this->paylines $paylines;
  448.         return $this;
  449.     }
  450.     public function getLayout(): ?string
  451.     {
  452.         return $this->layout;
  453.     }
  454.     public function setLayout(?string $layout): self
  455.     {
  456.         $this->layout $layout;
  457.         return $this;
  458.     }
  459.     public function getGalleryHash(): ?string
  460.     {
  461.         return $this->galleryHash;
  462.     }
  463.     public function setGalleryHash(?string $hash): self
  464.     {
  465.         $this->galleryHash $hash;
  466.         return $this;
  467.     }
  468.     public function getDataHash(): ?string
  469.     {
  470.         return $this->dataHash;
  471.     }
  472.     public function setDataHash(?string $hash): self
  473.     {
  474.         $this->dataHash $hash;
  475.         return $this;
  476.     }
  477.     public function getTechnology(): ?string
  478.     {
  479.         return $this->technology;
  480.     }
  481.     public function setTechnology(?string $technology): self
  482.     {
  483.         $this->technology $technology;
  484.         return $this;
  485.     }
  486.     public function getVariance(): ?string
  487.     {
  488.         return $this->variance;
  489.     }
  490.     public function setVariance(?string $variance): self
  491.     {
  492.         $this->variance $variance;
  493.         return $this;
  494.     }
  495.     public function getMaxWin(): ?int
  496.     {
  497.         return $this->maxWin;
  498.     }
  499.     public function setMaxWin(?int $maxWin): self
  500.     {
  501.         $this->maxWin $maxWin;
  502.         return $this;
  503.     }
  504.     public function getSource(): ?string
  505.     {
  506.         return $this->source;
  507.     }
  508.     public function setSource(?string $source): self
  509.     {
  510.         $this->source $source;
  511.         return $this;
  512.     }
  513.     /**
  514.      * @return Collection|SlotScreenshot[]
  515.      */
  516.     public function getScreenshots()
  517.     {
  518.         return $this->slotScreenshots;
  519.     }
  520.     public function addScreenshot(SlotScreenshot $screenshot): self
  521.     {
  522.         if (!$this->slotScreenshots->contains($screenshot)) {
  523.             $this->slotScreenshots[] = $screenshot;
  524.             $screenshot->setSlot($this);
  525.             $this->addCollectionLog(LogActionEnum::ADD'screenshot'$screenshot);
  526.         }
  527.         return $this;
  528.     }
  529.     public function removeScreenshot(SlotScreenshot $screenshot): self
  530.     {
  531.         if ($this->slotScreenshots->contains($screenshot)) {
  532.             $this->slotScreenshots->removeElement($screenshot);
  533.             $screenshot->setSlot(null);
  534.             $this->addCollectionLog(LogActionEnum::REMOVE'screenshot'$screenshot);
  535.         }
  536.         return $this;
  537.     }
  538.     /**
  539.      * @return Collection|SlotCasinoGeo[]
  540.      */
  541.     public function getSlotCasinosGeos()
  542.     {
  543.         return $this->slotCasinosGeos;
  544.     }
  545.     public function addSlotCasinosGeos(SlotCasinoGeo $slotCasinoGeo): self
  546.     {
  547.         if (!$this->slotCasinosGeos->contains($slotCasinoGeo)) {
  548.             $this->slotCasinosGeos[] = $slotCasinoGeo;
  549.             $slotCasinoGeo->setSlot($this);
  550.             $this->addCollectionLog(LogActionEnum::ADD'slotCasinoGeo'$slotCasinoGeo);
  551.         }
  552.         return $this;
  553.     }
  554.     public function removeSlotCasinosGeos(SlotCasinoGeo $slotCasinoGeo): self
  555.     {
  556.         if ($this->slotCasinosGeos->contains($slotCasinoGeo)) {
  557.             $this->slotCasinosGeos->removeElement($slotCasinoGeo);
  558.             $slotCasinoGeo->setSlot(null);
  559.             $this->addCollectionLog(LogActionEnum::REMOVE'slotCasinoGeo'$slotCasinoGeo);
  560.         }
  561.         return $this;
  562.     }
  563.     public function getSlotDevices()
  564.     {
  565.         return $this->slotDevices;
  566.     }
  567.     public function addSlotDevice(SlotDevice $device): self
  568.     {
  569.         if (!$this->slotDevices->contains($device)) {
  570.             $this->slotDevices[] = $device;
  571.             $device->addSlot($this);
  572.             $this->addCollectionLog(LogActionEnum::ADD'slotDevice'$device);
  573.         }
  574.         return $this;
  575.     }
  576.     public function removeSlotDevice(SlotDevice $device): self
  577.     {
  578.         if ($this->slotDevices->contains($device)) {
  579.             $this->slotDevices->removeElement($device);
  580.             $device->removeSlot($this);
  581.             $this->addCollectionLog(LogActionEnum::REMOVE'slotDevice'$device);
  582.         }
  583.         return $this;
  584.     }
  585.     public function getSlotTags()
  586.     {
  587.         return $this->slotTags;
  588.     }
  589.     public function addSlotTag(SlotTag $tag): self
  590.     {
  591.         if (!$this->slotTags->contains($tag)) {
  592.             $this->slotTags[] = $tag;
  593.             $tag->addSlot($this);
  594.             $this->addCollectionLog(LogActionEnum::ADD'slotTag'$tag);
  595.         }
  596.         return $this;
  597.     }
  598.     public function removeSlotTag(SlotTag $tag): self
  599.     {
  600.         if ($this->slotTags->contains($tag)) {
  601.             $this->slotTags->removeElement($tag);
  602.             $tag->removeSlot($this);
  603.             $this->addCollectionLog(LogActionEnum::REMOVE'slotTag'$tag);
  604.         }
  605.         return $this;
  606.     }
  607.     public function getSlotFeatures()
  608.     {
  609.         return $this->slotFeatures;
  610.     }
  611.     public function addSlotFeature(SlotFeature $slotFeature): self
  612.     {
  613.         if (!$this->slotFeatures->contains($slotFeature)) {
  614.             $this->slotFeatures[] = $slotFeature;
  615.             $slotFeature->addSlot($this);
  616.             $this->addCollectionLog(LogActionEnum::ADD'slotFeature'$slotFeature);
  617.         }
  618.         return $this;
  619.     }
  620.     public function removeSlotFeature(SlotFeature $slotFeature): self
  621.     {
  622.         if ($this->slotFeatures->contains($slotFeature)) {
  623.             $this->slotFeatures->removeElement($slotFeature);
  624.             $slotFeature->removeSlot($this);
  625.             $this->addCollectionLog(LogActionEnum::REMOVE'slotFeature'$slotFeature);
  626.         }
  627.         return $this;
  628.     }
  629.     public function getSlotThemes()
  630.     {
  631.         return $this->slotThemes;
  632.     }
  633.     public function addSlotTheme(SlotTheme $slotTheme): self
  634.     {
  635.         if (!$this->slotThemes->contains($slotTheme)) {
  636.             $this->slotThemes[] = $slotTheme;
  637.             $slotTheme->addSlot($this);
  638.             $this->addCollectionLog(LogActionEnum::ADD'slotTheme'$slotTheme);
  639.         }
  640.         return $this;
  641.     }
  642.     public function removeSlotTheme(SlotTheme $slotTheme): self
  643.     {
  644.         if ($this->slotThemes->contains($slotTheme)) {
  645.             $this->slotThemes->removeElement($slotTheme);
  646.             $slotTheme->removeSlot($this);
  647.             $this->addCollectionLog(LogActionEnum::REMOVE'slotTheme'$slotTheme);
  648.         }
  649.         return $this;
  650.     }
  651.     public function setEnableGame(bool $enableGame): self
  652.     {
  653.         $this->enableGame $enableGame;
  654.         return $this;
  655.     }
  656.     public function getEnableGame(): bool
  657.     {
  658.         return $this->enableGame;
  659.     }
  660.     /**
  661.      * @return Collection|Casino[]
  662.      */
  663.     public function getCasinos(): Collection
  664.     {
  665.         return $this->casinos;
  666.     }
  667.     /**
  668.      * @param Casino $casino
  669.      * @return $this
  670.      */
  671.     public function addCasino(Casino $casino): self
  672.     {
  673.         if (!$this->casinos->contains($casino)) {
  674.             $this->casinos[] = $casino;
  675.             $casino->addSlot($this);
  676.             $this->addCollectionLog(LogActionEnum::ADD'casino'$casino);
  677.         }
  678.         return $this;
  679.     }
  680.     /**
  681.      * @param Casino $casino
  682.      * @return $this
  683.      */
  684.     public function removeCasino(Casino $casino): self
  685.     {
  686.         if ($this->casinos->contains($casino)) {
  687.             $this->casinos->removeElement($casino);
  688.             $casino->removeSlot($this);
  689.             $this->addCollectionLog(LogActionEnum::REMOVE'casino'$casino);
  690.         }
  691.         return $this;
  692.     }
  693.     /**
  694.      * @return Collection|Site[]
  695.      */
  696.     public function getSites(): Collection
  697.     {
  698.         return $this->sites;
  699.     }
  700.     /**
  701.      * @param Site $site
  702.      * @return $this
  703.      */
  704.     public function addSite(Site $site): self
  705.     {
  706.         if (!$this->sites->contains($site)) {
  707.             $this->sites[] = $site;
  708.             $this->addCollectionLog(LogActionEnum::ADD'site'$site);
  709.         }
  710.         return $this;
  711.     }
  712.     /**
  713.      * @param Site $site
  714.      * @return $this
  715.      */
  716.     public function removeSite(Site $site): self
  717.     {
  718.         if ($this->sites->contains($site)) {
  719.             $this->sites->removeElement($site);
  720.             $this->addCollectionLog(LogActionEnum::REMOVE'site'$site);
  721.         }
  722.         return $this;
  723.     }
  724.     /**
  725.      * @return Collection|NewBonus[]
  726.      */
  727.     public function getNewBonuses(): Collection
  728.     {
  729.         return $this->newBonuses;
  730.     }
  731.     /**
  732.      * @param NewBonus $newBonus
  733.      * @return $this
  734.      */
  735.     public function addNewBonus(NewBonus $newBonus): self
  736.     {
  737.         if (!$this->newBonuses->contains($newBonus)) {
  738.             $this->newBonuses[] = $newBonus;
  739.             $newBonus->addSlot($this);
  740.             $this->addCollectionLog(LogActionEnum::ADD'newBonus'$newBonus);
  741.         }
  742.         return $this;
  743.     }
  744.     /**
  745.      * @param NewBonus $newBonus
  746.      * @return $this
  747.      */
  748.     public function removeNewBonus(NewBonus $newBonus): self
  749.     {
  750.         if ($this->newBonuses->contains($newBonus)) {
  751.             $this->newBonuses->removeElement($newBonus);
  752.             $newBonus->removeSlot($this);
  753.             $this->addCollectionLog(LogActionEnum::REMOVE'newBonus'$newBonus);
  754.         }
  755.         return $this;
  756.     }
  757.     /**
  758.      * @return Collection|IssueReport[]
  759.      */
  760.     public function getIssueReports(): Collection
  761.     {
  762.         return $this->issueReports;
  763.     }
  764.     /**
  765.      * @param IssueReport $issueReport
  766.      * @return $this
  767.      */
  768.     public function addIssueReport(IssueReport $issueReport): self
  769.     {
  770.         if (!$this->issueReports->contains($issueReport)) {
  771.             $this->issueReports[] = $issueReport;
  772.             $issueReport->setSlot($this);
  773.             $this->addCollectionLog(LogActionEnum::ADD'issueReport'$issueReport);
  774.         }
  775.         return $this;
  776.     }
  777.     /**
  778.      * @param IssueReport $issueReport
  779.      * @return $this
  780.      */
  781.     public function removeIssueReport(IssueReport $issueReport): self
  782.     {
  783.         if ($this->issueReports->contains($issueReport)) {
  784.             $this->issueReports->removeElement($issueReport);
  785.             $issueReport->setSlot(null);
  786.             $this->addCollectionLog(LogActionEnum::REMOVE'issueReport'$issueReport);
  787.         }
  788.         return $this;
  789.     }
  790. }