Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function setTranslatable(?TranslatableInterface $translatable): void |
||
32 | { |
||
33 | if ($translatable === $this->translatable) { |
||
34 | return; |
||
35 | } |
||
36 | |||
37 | $previousTranslatable = $this->translatable; |
||
38 | $this->translatable = $translatable; |
||
39 | |||
40 | $previousTranslatable?->removeTranslation($this); |
||
41 | |||
42 | $translatable?->addTranslation($this); |
||
43 | } |
||
61 |