HasUralicVerboseMethods::inEstonian()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
nc 1
cc 1
nop 0
1
<?php
2
3
namespace ChinLeung\VerboseLocalization\Concerns;
4
5
trait HasUralicVerboseMethods
6
{
7
    /**
8
     * Retrieve the translation in another locale.
9
     *
10
     * @param  string  $locale
11
     * @return mixed
12
     */
13
    abstract public function getTranslationIn(string $locale);
14
15
    /**
16
     * Function to retrieve the translation in Estonian.
17
     *
18
     * @return mixed
19
     */
20
    public function inEstonian()
21
    {
22
        return $this->getTranslationIn('et');
23
    }
24
25
    /**
26
     * Function to retrieve the translation in Finnish.
27
     *
28
     * @return mixed
29
     */
30
    public function inFinnish()
31
    {
32
        return $this->getTranslationIn('fi');
33
    }
34
35
    /**
36
     * Function to retrieve the translation in Hungarian.
37
     *
38
     * @return mixed
39
     */
40
    public function inHungarian()
41
    {
42
        return $this->getTranslationIn('hu');
43
    }
44
}
45