55use HiEvents \DomainObjects \CapacityAssignmentDomainObject ;
66use HiEvents \DomainObjects \CheckInListDomainObject ;
77use HiEvents \DomainObjects \Enums \EventImageType ;
8+ use HiEvents \DomainObjects \Enums \QuestionBelongsTo ;
89use HiEvents \DomainObjects \EventDomainObject ;
910use HiEvents \DomainObjects \EventSettingDomainObject ;
1011use HiEvents \DomainObjects \ImageDomainObject ;
@@ -181,7 +182,7 @@ private function cloneExistingTickets(
181182 private function clonePerTicketQuestions (EventDomainObject $ event , int $ newEventId , array $ oldTicketToNewTicketMap ): void
182183 {
183184 foreach ($ event ->getQuestions () as $ question ) {
184- if ($ question ->getBelongsTo () == " TICKET " ) {
185+ if ($ question ->getBelongsTo () === QuestionBelongsTo:: TICKET -> name ) {
185186 $ this ->createQuestionService ->createQuestion (
186187 (new QuestionDomainObject ())
187188 ->setTitle ($ question ->getTitle ())
@@ -206,7 +207,7 @@ private function clonePerTicketQuestions(EventDomainObject $event, int $newEvent
206207 private function clonePerOrderQuestions (EventDomainObject $ event , int $ newEventId ): void
207208 {
208209 foreach ($ event ->getQuestions () as $ question ) {
209- if ($ question ->getBelongsTo () == " ORDER " ) {
210+ if ($ question ->getBelongsTo () === QuestionBelongsTo:: ORDER -> name ) {
210211 $ this ->createQuestionService ->createQuestion (
211212 (new QuestionDomainObject ())
212213 ->setTitle ($ question ->getTitle ())
0 commit comments