| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 11 | 15 | public function exists(TranslationInterface $translation): bool |
|
| 12 | { |
||
| 13 | 15 | return $this->query() |
|
| 14 | ->where(static function ($q) use ($translation) { |
||
| 15 | 15 | $q->where('group', $translation->getGroup()) |
|
| 16 | 15 | ->where('key', $translation->getKey()); |
|
| 17 | 15 | }) |
|
| 18 | 15 | ->orWhere('id', $translation->getId()) |
|
| 19 | 15 | ->exists(); |
|
| 20 | } |
||
| 22 |