Test Failed
Pull Request — master (#2143)
by Janko
33:22 queued 22:15
created

User::getEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\Common\Collections\ArrayCollection;
8
use Doctrine\Common\Collections\Collection;
9
use Doctrine\ORM\Mapping\Column;
10
use Doctrine\ORM\Mapping\Entity;
11
use Doctrine\ORM\Mapping\GeneratedValue;
12
use Doctrine\ORM\Mapping\Id;
13
use Doctrine\ORM\Mapping\Index;
14
use Doctrine\ORM\Mapping\JoinColumn;
15
use Doctrine\ORM\Mapping\ManyToOne;
16
use Doctrine\ORM\Mapping\OneToMany;
17
use Doctrine\ORM\Mapping\OneToOne;
18
use Doctrine\ORM\Mapping\OrderBy;
19
use Doctrine\ORM\Mapping\Table;
20
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
use Stu\Component\Game\GameEnum;
0 ignored issues
show
Bug introduced by
The type Stu\Component\Game\GameEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
22
use Stu\Component\Game\ModuleEnum;
23
use Stu\Component\Map\MapEnum;
0 ignored issues
show
Bug introduced by
The type Stu\Component\Map\MapEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
24
use Stu\Component\Player\UserAwardEnum;
0 ignored issues
show
Bug introduced by
The type Stu\Component\Player\UserAwardEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
25
use Stu\Component\Player\UserCssClassEnum;
26
use Stu\Component\Player\UserRpgBehaviorEnum;
27
use Stu\Module\PlayerSetting\Lib\UserEnum;
0 ignored issues
show
Bug introduced by
The type Stu\Module\PlayerSetting\Lib\UserEnum was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
28
use Stu\Module\PlayerSetting\Lib\UserSettingEnum;
29
use Stu\Orm\Repository\UserRepository;
30
31
#[Table(name: 'stu_user')]
32
#[Index(name: 'user_alliance_idx', columns: ['allys_id'])]
33
#[Entity(repositoryClass: UserRepository::class)]
34
class User implements UserInterface
35
{
36
    #[Id]
37
    #[Column(type: 'integer')]
38
    #[GeneratedValue(strategy: 'IDENTITY')]
39
    private int $id;
40
41
    #[Column(type: 'string')]
42
    private string $username = '';
43
44
    #[Column(type: 'integer', nullable: true)]
45
    private ?int $allys_id = null;
46
47
    #[Column(type: 'integer')]
48
    private int $race = 9;
49
50
    #[Column(type: 'smallint')]
51
    private int $state = UserEnum::USER_STATE_NEW;
52
53
    #[Column(type: 'integer')]
54
    private int $lastaction = 0;
55
56
    #[Column(type: 'integer')]
57
    private int $kn_lez = 0;
58
59
    #[Column(type: 'boolean')]
60
    private bool $vac_active = false;
61
62
    #[Column(type: 'integer')]
63
    private int $vac_request_date = 0;
64
65
    #[Column(type: 'text')]
66
    private string $description = '';
67
68
    #[Column(type: 'smallint', nullable: true)]
69
    private ?int $maptype = MapEnum::MAPTYPE_INSERT;
0 ignored issues
show
introduced by
The private property $maptype is not used, and could be removed.
Loading history...
70
71
    #[Column(type: 'text')]
72
    private string $sessiondata = '';
73
74
    #[Column(type: 'integer')]
75
    private int $prestige = 0;
76
77
    #[Column(type: 'boolean')]
78
    private bool $deals = false;
79
80
    #[Column(type: 'integer', nullable: true)]
81
    private ?int $last_boarding = null;
82
83
    #[OneToOne(targetEntity: 'UserRegistration', mappedBy: 'user', cascade: ['all'])]
84
    private UserRegistrationInterface $registration;
85
86
    #[ManyToOne(targetEntity: 'Alliance', inversedBy: 'members')]
87
    #[JoinColumn(name: 'allys_id', referencedColumnName: 'id')]
88
    private ?AllianceInterface $alliance = null;
89
90
    #[ManyToOne(targetEntity: 'Faction')]
91
    #[JoinColumn(name: 'race', referencedColumnName: 'id')]
92
    private FactionInterface $faction;
93
94
    /**
95
     * @var ArrayCollection<int, BuoyInterface>
96
     */
97
    #[OneToMany(targetEntity: 'Buoy', mappedBy: 'user')]
98
    private Collection $buoys;
99
100
    /**
101
     * @var ArrayCollection<int, UserAwardInterface>
102
     */
103
    #[OneToMany(targetEntity: 'UserAward', mappedBy: 'user', indexBy: 'award_id')]
104
    #[OrderBy(['award_id' => 'ASC'])]
105
    private Collection $awards;
106
107
    /**
108
     * @var ArrayCollection<int, ColonyInterface>
109
     */
110
    #[OneToMany(targetEntity: 'Colony', mappedBy: 'user', indexBy: 'id')]
111
    #[OrderBy(['colonies_classes_id' => 'ASC', 'id' => 'ASC'])]
112
    private Collection $colonies;
113
114
    /**
115
     * @var ArrayCollection<int, UserLayerInterface>
116
     */
117
    #[OneToMany(targetEntity: 'UserLayer', mappedBy: 'user', indexBy: 'layer_id')]
118
    private Collection $userLayers;
119
120
    #[OneToOne(targetEntity: 'UserLock', mappedBy: 'user')]
121
    private ?UserLockInterface $userLock = null;
122
123
    /**
124
     * @var ArrayCollection<string, UserSettingInterface>
125
     */
126
    #[OneToMany(targetEntity: 'UserSetting', mappedBy: 'user', indexBy: 'setting')]
127
    private Collection $settings;
128
129
    /**
130
     * @var ArrayCollection<int, UserCharacterInterface>
131
     */
132
    #[OneToMany(targetEntity: 'UserCharacter', mappedBy: 'user')]
133
    private Collection $characters;
134
135
    /**
136
     * @var ArrayCollection<int, ColonyScanInterface>
137
     */
138
    #[OneToMany(targetEntity: 'ColonyScan', mappedBy: 'user', indexBy: 'id', fetch: 'EXTRA_LAZY')]
139
    #[OrderBy(['colony_id' => 'ASC', 'date' => 'ASC'])]
140
    private Collection $colonyScans;
141
142
    #[OneToOne(targetEntity: 'PirateWrath', mappedBy: 'user')]
143
    private ?PirateWrathInterface $pirateWrath = null;
144
145
    /**
146
     * @var ArrayCollection<int, UserTutorialInterface>
147
     */
148
    #[OneToMany(targetEntity: 'UserTutorial', mappedBy: 'user', indexBy: 'tutorial_step_id', fetch: 'EXTRA_LAZY')]
149
    private Collection $tutorials;
150
151
    /** @var null|array<mixed> */
152
    private $sessiondataUnserialized;
153
154
    /**
155
     * @var ArrayCollection<int, WormholeRestriction>
156
     */
157
    #[OneToMany(targetEntity: 'WormholeRestriction', mappedBy: 'user')]
158
    private Collection $wormholeRestrictions;
159
160
    public function __construct()
161
    {
162
        $this->awards = new ArrayCollection();
163
        $this->colonies = new ArrayCollection();
164
        $this->userLayers = new ArrayCollection();
165
        $this->settings = new ArrayCollection();
166
        $this->characters = new ArrayCollection();
167
        $this->buoys = new ArrayCollection();
168
        $this->colonyScans = new ArrayCollection();
169
        $this->tutorials = new ArrayCollection();
170
        $this->wormholeRestrictions = new ArrayCollection();
171
    }
172
173
    #[Override]
174
    public function getId(): int
175
    {
176
        return $this->id;
177
    }
178
179
    #[Override]
180
    public function getRegistration(): UserRegistrationInterface
181
    {
182
        return $this->registration;
183
    }
184
185
    #[Override]
186
    public function setRegistration(UserRegistrationInterface $registration): UserInterface
187
    {
188
        $this->registration = $registration;
189
190
        return $this;
191
    }
192
193
    #[Override]
194
    public function getName(): string
195
    {
196
        //if UMODE active, add info to user name
197
        if ($this->isVacationRequestOldEnough()) {
198
            return $this->username . '[b][color=red] (UMODE)[/color][/b]';
199
        }
200
        return $this->username;
201
    }
202
203
    #[Override]
204 201
    public function setUsername(string $username): UserInterface
205
    {
206
        $this->username = $username;
207 201
        return $this;
208
    }
209
210 201
    #[Override]
211
    public function getRgbCode(): string
212
    {
213
        $setting = $this->getSettings()->get(UserSettingEnum::RGB_CODE->value);
214 201
        if ($setting !== null) {
215
            return $setting->getValue();
216
        }
217 201
218
        return '';
219
    }
220
221
    #[Override]
222
    public function getCss(): string
223
    {
224
        $setting = $this->getSettings()->get(UserSettingEnum::CSS_COLOR_SHEET->value);
225
        if ($setting !== null) {
226
            return $setting->getValue();
227
        }
228
229
        return UserCssClassEnum::BLACK->value;
230
    }
231
232
    #[Override]
233
    public function getFactionId(): int
234
    {
235
        return $this->race;
236
    }
237
238
    #[Override]
239
    public function setFaction(FactionInterface $faction): UserInterface
240
    {
241
        $this->faction = $faction;
242
        return $this;
243
    }
244
245
    #[Override]
246
    public function getFaction(): FactionInterface
247
    {
248
        return $this->faction;
249
    }
250
251
    #[Override]
252
    public function getAwards(): Collection
253
    {
254
        return $this->awards;
255
    }
256
257
    #[Override]
258
    public function getColonies(): Collection
259
    {
260
        return $this->colonies;
261
    }
262
263
    #[Override]
264
    public function hasColony(): bool
265
    {
266 1
        if (
267
            $this->getState() === UserEnum::USER_STATE_COLONIZATION_SHIP
268
            || $this->getState() === UserEnum::USER_STATE_UNCOLONIZED
269 1
        ) {
270
            return false;
271
        }
272
273
        return !$this->getColonies()->isEmpty();
274
    }
275
276
    #[Override]
277
    public function getState(): int
278
    {
279
        return $this->state;
280
    }
281
282
    #[Override]
283
    public function isLocked(): bool
284
    {
285
        return $this->getUserLock() !== null && $this->getUserLock()->getRemainingTicks() > 0;
286
    }
287
288
    #[Override]
289
    public function getUserStateDescription(): string
290
    {
291
        if ($this->isLocked()) {
292 1
            return _('GESPERRT');
293
        }
294
        return UserEnum::getUserStateDescription($this->getState());
295 1
    }
296 1
297
    #[Override]
298
    public function setState(int $state): UserInterface
299
    {
300 1
        $this->state = $state;
301
        return $this;
302
    }
303 201
304
    #[Override]
305
    public function getAvatar(): string
306 201
    {
307 201
        $setting = $this->getSettings()->get(UserSettingEnum::AVATAR->value);
308
        if ($setting !== null) {
309
            return $setting->getValue();
310
        }
311 201
312
        return '';
313
    }
314 201
315
    #[Override]
316
    public function isEmailNotification(): bool
317 201
    {
318
        $setting = $this->getSettings()->get(UserSettingEnum::EMAIL_NOTIFICATION->value);
319
        if ($setting !== null) {
320
            return (bool)$setting->getValue();
321
        }
322
323
        return false;
324
    }
325
326
    #[Override]
327 11
    public function getLastaction(): int
328
    {
329
        return $this->lastaction;
330 11
    }
331
332
    #[Override]
333 1
    public function setLastaction(int $lastaction): UserInterface
334
    {
335
        $this->lastaction = $lastaction;
336 1
        return $this;
337
    }
338
339 12
    #[Override]
340
    public function getKnMark(): int
341
    {
342 12
        return $this->kn_lez;
343
    }
344
345 2
    #[Override]
346
    public function setKnMark(int $knMark): UserInterface
347
    {
348
        $this->kn_lez = $knMark;
349 2
        return $this;
350 2
    }
351
352
    #[Override]
353
    public function isVacationMode(): bool
354
    {
355 2
        return $this->vac_active;
356
    }
357
358 6
    #[Override]
359
    public function setVacationMode(bool $vacationMode): UserInterface
360
    {
361 6
        $this->vac_active = $vacationMode;
362
        return $this;
363
    }
364 1
365
    #[Override]
366
    public function getVacationRequestDate(): int
367 1
    {
368
        return $this->vac_request_date;
369
    }
370 1
371
    #[Override]
372
    public function setVacationRequestDate(int $date): UserInterface
373 1
    {
374
        $this->vac_request_date = $date;
375
376 1
        return $this;
377
    }
378
379
    #[Override]
380
    public function isVacationRequestOldEnough(): bool
381
    {
382
        return $this->isVacationMode() && (time() - $this->getVacationRequestDate() > UserEnum::VACATION_DELAY_IN_SECONDS);
383
    }
384
385
    #[Override]
386 201
    public function isStorageNotification(): bool
387
    {
388
        $setting = $this->getSettings()->get(UserSettingEnum::STORAGE_NOTIFICATION->value);
389 201
        if ($setting !== null) {
390 201
            return (bool)$setting->getValue();
391
        }
392
393
        return false;
394 201
    }
395
396
    #[Override]
397 1
    public function getDescription(): string
398
    {
399
        return $this->description;
400 1
    }
401 1
402
    #[Override]
403
    public function setDescription(string $description): UserInterface
404
    {
405 1
        $this->description = $description;
406
        return $this;
407
    }
408 4
409
    #[Override]
410
    public function isShowOnlineState(): bool
411 4
    {
412
        $setting = $this->getSettings()->get(UserSettingEnum::SHOW_ONLINE_STATUS->value);
413
        if ($setting !== null) {
414
            return (bool)$setting->getValue();
415
        }
416
417
        return false;
418
    }
419
420
    #[Override]
421 1
    public function isShowPmReadReceipt(): bool
422
    {
423
        $setting = $this->getSettings()->get(UserSettingEnum::SHOW_PM_READ_RECEIPT->value);
424 1
        if ($setting !== null) {
425
            return (bool)$setting->getValue();
426
        }
427
428
        return false;
429
    }
430
431
    #[Override]
432
    public function isSaveLogin(): bool
433
    {
434 4
        $setting = $this->getSettings()->get(UserSettingEnum::SAVE_LOGIN->value);
435
        if ($setting !== null) {
436
            return (bool)$setting->getValue();
437 4
        }
438
439
        return false;
440
    }
441
442
    #[Override]
443
    public function getFleetFixedDefault(): bool
444
    {
445
        $setting = $this->getSettings()->get(UserSettingEnum::FLEET_FIXED_DEFAULT->value);
446
        if ($setting !== null) {
447
            return (bool)$setting->getValue();
448
        }
449
450
        return false;
451
    }
452
453
    #[Override]
454
    public function getWarpsplitAutoCarryoverDefault(): bool
455
    {
456
        $setting = $this->getSettings()->get(UserSettingEnum::WARPSPLIT_AUTO_CARRYOVER_DEFAULT->value);
457
        if ($setting !== null) {
458
            return (bool)$setting->getValue();
459
        }
460 201
461
        return false;
462
    }
463 201
464
    #[Override]
465
    public function getUserLayers(): Collection
466
    {
467
        return $this->userLayers;
468
    }
469
470
    #[Override]
471
    public function hasSeen(int $layerId): bool
472
    {
473
        return $this->getUserLayers()->containsKey($layerId);
474
    }
475
476
    #[Override]
477
    public function hasExplored(int $layerId): bool
478
    {
479
        return $this->hasSeen($layerId) && $this->getUserLayers()->get($layerId)->isExplored();
480
    }
481
482
    #[Override]
483
    public function getSettings(): Collection
484
    {
485
        return $this->settings;
486
    }
487 201
488
    #[Override]
489
    public function getSessiondata(): string
490 201
    {
491
        return $this->sessiondata;
492
    }
493 1
494
    #[Override]
495
    public function setSessiondata(string $sessiondata): UserInterface
496 1
    {
497 1
        $this->sessiondata = $sessiondata;
498
        $this->sessiondataUnserialized = null;
499
        return $this;
500
    }
501 1
502
    #[Override]
503
    public function getPrestige(): int
504 2
    {
505
        return $this->prestige;
506
    }
507 2
508
    #[Override]
509
    public function setPrestige(int $prestige): UserInterface
510
    {
511
        $this->prestige = $prestige;
512
        return $this;
513
    }
514
515
    #[Override]
516
    public function getDefaultView(): ModuleEnum
517 5
    {
518
        $setting = $this->getSettings()->get(UserSettingEnum::DEFAULT_VIEW->value);
519
        if ($setting !== null) {
520 5
            return ModuleEnum::from($setting->getValue());
521 5
        }
522
523
        return ModuleEnum::MAINDESK;
524
    }
525 5
526
    #[Override]
527
    public function getRpgBehavior(): UserRpgBehaviorEnum
528 2
    {
529
        $setting = $this->getSettings()->get(UserSettingEnum::RPG_BEHAVIOR->value);
530
        if ($setting !== null) {
531 2
            return UserRpgBehaviorEnum::from((int)$setting->getValue());
532 2
        }
533 1
534
        return UserRpgBehaviorEnum::NOT_SET;
535
    }
536 2
537
    #[Override]
538
    public function getDeals(): bool
539 1
    {
540
        return $this->deals;
541
    }
542 1
543 1
    #[Override]
544
    public function setDeals(bool $deals): UserInterface
545
    {
546
        $this->deals = $deals;
547 1
        return $this;
548
    }
549
550 1
    #[Override]
551
    public function getLastBoarding(): ?int
552
    {
553 1
        return $this->last_boarding;
554 1
    }
555
556
    #[Override]
557
    public function setLastBoarding(int $lastBoarding): UserInterface
558 1
    {
559
        $this->last_boarding = $lastBoarding;
560
        return $this;
561 1
    }
562
563
    #[Override]
564 1
    public function isOnline(): bool
565 1
    {
566
        return !($this->getLastAction() < time() - GameEnum::USER_ONLINE_PERIOD);
567
    }
568
569 1
    #[Override]
570
    public function getAlliance(): ?AllianceInterface
571
    {
572
        return $this->alliance;
573
    }
574
575
    #[Override]
576
    public function setAlliance(?AllianceInterface $alliance): UserInterface
577
    {
578
        $this->alliance = $alliance;
579
        return $this;
580
    }
581
582
    #[Override]
583
    public function setAllianceId(?int $allianceId): UserInterface
584
    {
585 5
        $this->allys_id = $allianceId;
586
        return $this;
587
    }
588 5
589
    #[Override]
590
    public function getSessionDataUnserialized(): array
591 4
    {
592
        if ($this->sessiondataUnserialized === null) {
593
            $this->sessiondataUnserialized = unserialize($this->getSessionData());
594 4
            if (!is_array($this->sessiondataUnserialized)) {
595
                $this->sessiondataUnserialized = [];
596
            }
597 4
        }
598
        return $this->sessiondataUnserialized;
599
    }
600 4
601
    #[Override]
602
    public function isContactable(): bool
603 201
    {
604
        return $this->getId() != UserEnum::USER_NOONE;
605
    }
606 201
607
    #[Override]
608
    public function hasAward(int $awardId): bool
609 1
    {
610
        return $this->awards->containsKey($awardId) === true;
611
    }
612 1
613
    #[Override]
614
    public function hasStationsPmCategory(): bool
615
    {
616
        if ($this->isNpc()) {
617
            return true;
618
        }
619
620
        return $this->hasAward(UserAwardEnum::RESEARCHED_STATIONS);
621
    }
622
623 1
    public static function isUserNpc(int $userId): bool
624
    {
625
        return $userId < UserEnum::USER_FIRST_ID;
626 1
    }
627
628
    #[Override]
629
    public function isNpc(): bool
630
    {
631
        return self::isUserNpc($this->getId());
632
    }
633
634
    #[Override]
635
    public function getUserLock(): ?UserLockInterface
636 5
    {
637
        return $this->userLock;
638
    }
639 5
640
    #[Override]
641
    public function __toString(): string
642
    {
643
        return sprintf('userName: %s', $this->getName());
644
    }
645
646
    #[Override]
647
    public function hasTranslation(): bool
648
    {
649 2
        $text = $this->getDescription();
650
        return strpos($text, '[translate]') !== false && strpos($text, '[/translate]') !== false;
651
    }
652 2
653 2
    #[Override]
654
    public function isShowPirateHistoryEntrys(): bool
655
    {
656
        $setting = $this->getSettings()->get(UserSettingEnum::SHOW_PIRATE_HISTORY_ENTRYS->value);
657 2
        if ($setting !== null) {
658
            return (bool)$setting->getValue();
659
        }
660 5
661
        return false;
662
    }
663 5
664 5
    #[Override]
665
    public function isInboxMessengerStyle(): bool
666
    {
667
        $setting = $this->getSettings()->get(UserSettingEnum::INBOX_MESSENGER_STYLE->value);
668 5
        if ($setting !== null) {
669
            return (bool)$setting->getValue();
670
        }
671 3
672
        return false;
673
    }
674 3
675
    #[Override]
676
    public function getCharacters(): Collection
677 1
    {
678
        return $this->characters;
679
    }
680 1
681 1
    #[Override]
682
    public function getColonyScans(): Collection
683
    {
684
        return $this->colonyScans;
685
    }
686
687
    /**
688
     * @return Collection<int, BuoyInterface>
689
     */
690
    public function getBuoys(): Collection
691
    {
692
        return $this->buoys;
693
    }
694
695
    #[Override]
696
    public function getPirateWrath(): ?PirateWrathInterface
697 2
    {
698
        return $this->pirateWrath;
699
    }
700 2
701
    #[Override]
702
    public function setPirateWrath(?PirateWrathInterface $wrath): UserInterface
703 20
    {
704
        $this->pirateWrath = $wrath;
705
706 20
        return $this;
707
    }
708
709
    #[Override]
710
    public function isProtectedAgainstPirates(): bool
711
    {
712
        $pirateWrath = $this->pirateWrath;
713
        if ($pirateWrath === null) {
714
            return false;
715
        }
716
717
        $timeout = $pirateWrath->getProtectionTimeout();
718
        if ($timeout === null) {
719
            return false;
720
        }
721
722
        return $timeout > time();
723 3
    }
724
725
    /**
726 3
     * @return Collection<int, UserTutorialInterface>
727 1
     */
728 1
    #[Override]
729 1
    public function getTutorials(): Collection
730
    {
731
        return $this->tutorials;
732 3
    }
733
734
    #[Override]
735 1
    /**
736
     * @return Collection<int, WormholeRestriction>
737
     */
738 1
    public function getWormholeRestrictions(): iterable
739
    {
740
        return $this->wormholeRestrictions;
741 200
    }
742
}
743