HasAfroAsiaticVerboseMethods   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 0
dl 0
loc 70
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
getTranslationIn() 0 1 ?
A inAmharic() 0 4 1
A inArabic() 0 4 1
A inHausa() 0 4 1
A inHebrew() 0 4 1
A inMaltese() 0 4 1
A inSomali() 0 4 1
1
<?php
2
3
namespace ChinLeung\VerboseLocalization\Concerns;
4
5
trait HasAfroAsiaticVerboseMethods
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 Amharic.
17
     *
18
     * @return mixed
19
     */
20
    public function inAmharic()
21
    {
22
        return $this->getTranslationIn('am');
23
    }
24
25
    /**
26
     * Function to retrieve the translation in Arabic.
27
     *
28
     * @return mixed
29
     */
30
    public function inArabic()
31
    {
32
        return $this->getTranslationIn('ar');
33
    }
34
35
    /**
36
     * Function to retrieve the translation in Hausa.
37
     *
38
     * @return mixed
39
     */
40
    public function inHausa()
41
    {
42
        return $this->getTranslationIn('ha');
43
    }
44
45
    /**
46
     * Function to retrieve the translation in Hebrew.
47
     *
48
     * @return mixed
49
     */
50
    public function inHebrew()
51
    {
52
        return $this->getTranslationIn('iw');
53
    }
54
55
    /**
56
     * Function to retrieve the translation in Maltese.
57
     *
58
     * @return mixed
59
     */
60
    public function inMaltese()
61
    {
62
        return $this->getTranslationIn('mt');
63
    }
64
65
    /**
66
     * Function to retrieve the translation in Somali.
67
     *
68
     * @return mixed
69
     */
70
    public function inSomali()
71
    {
72
        return $this->getTranslationIn('so');
73
    }
74
}
75