Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | public function setTranslatable(?TranslatableInterface $translatable): void |
||
25 | { |
||
26 | if ($translatable === $this->translatable) { |
||
27 | return; |
||
28 | } |
||
29 | |||
30 | $previousTranslatable = $this->translatable; |
||
31 | $this->translatable = $translatable; |
||
32 | |||
33 | $previousTranslatable?->removeTranslation($this); |
||
34 | |||
35 | $translatable?->addTranslation($this); |
||
36 | } |
||
54 |