HasIndoIranianVerboseMethods   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 140
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 13
lcom 1
cbo 0
dl 0
loc 140
rs 10
c 0
b 0
f 0

14 Methods

Rating   Name   Duplication   Size   Complexity  
getTranslationIn() 0 1 ?
A inBengali() 0 4 1
A inGujarati() 0 4 1
A inHindi() 0 4 1
A inKurmanjiKurdish() 0 4 1
A inMarathi() 0 4 1
A inNepali() 0 4 1
A inPashto() 0 4 1
A inPersian() 0 4 1
A inPunjabi() 0 4 1
A inUrdu() 0 4 1
A inTajik() 0 4 1
A inSinhala() 0 4 1
A inSindhi() 0 4 1
1
<?php
2
3
namespace ChinLeung\VerboseLocalization\Concerns;
4
5
trait HasIndoIranianVerboseMethods
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 Bengali.
17
     *
18
     * @return mixed
19
     */
20
    public function inBengali()
21
    {
22
        return $this->getTranslationIn('bn');
23
    }
24
25
    /**
26
     * Function to retrieve the translation in Gujarati.
27
     *
28
     * @return mixed
29
     */
30
    public function inGujarati()
31
    {
32
        return $this->getTranslationIn('gu');
33
    }
34
35
    /**
36
     * Function to retrieve the translation in Hindi.
37
     *
38
     * @return mixed
39
     */
40
    public function inHindi()
41
    {
42
        return $this->getTranslationIn('hi');
43
    }
44
45
    /**
46
     * Function to retrieve the translation in Kurdish (Kurmanji).
47
     *
48
     * @return mixed
49
     */
50
    public function inKurmanjiKurdish()
51
    {
52
        return $this->getTranslationIn('ku');
53
    }
54
55
    /**
56
     * Function to retrieve the translation in Marathi.
57
     *
58
     * @return mixed
59
     */
60
    public function inMarathi()
61
    {
62
        return $this->getTranslationIn('mr');
63
    }
64
65
    /**
66
     * Function to retrieve the translation in Nepali.
67
     *
68
     * @return mixed
69
     */
70
    public function inNepali() : string
71
    {
72
        return $this->getTranslationIn('ne');
73
    }
74
75
    /**
76
     * Function to retrieve the translation in Pashto.
77
     *
78
     * @return mixed
79
     */
80
    public function inPashto() : string
81
    {
82
        return $this->getTranslationIn('ps');
83
    }
84
85
    /**
86
     * Function to retrieve the translation in Persian.
87
     *
88
     * @return mixed
89
     */
90
    public function inPersian() : string
91
    {
92
        return $this->getTranslationIn('fa');
93
    }
94
95
    /**
96
     * Function to retrieve the translation in Punjabi.
97
     *
98
     * @return mixed
99
     */
100
    public function inPunjabi() : string
101
    {
102
        return $this->getTranslationIn('pa');
103
    }
104
105
    /**
106
     * Function to retrieve the translation in Urdu.
107
     *
108
     * @return mixed
109
     */
110
    public function inUrdu() : string
111
    {
112
        return $this->getTranslationIn('ur');
113
    }
114
115
    /**
116
     * Function to retrieve the translation in Tajik.
117
     *
118
     * @return mixed
119
     */
120
    public function inTajik() : string
121
    {
122
        return $this->getTranslationIn('tg');
123
    }
124
125
    /**
126
     * Function to retrieve the translation in Sinhala.
127
     *
128
     * @return mixed
129
     */
130
    public function inSinhala() : string
131
    {
132
        return $this->getTranslationIn('si');
133
    }
134
135
    /**
136
     * Function to retrieve the translation in Sindhi.
137
     *
138
     * @return mixed
139
     */
140
    public function inSindhi() : string
141
    {
142
        return $this->getTranslationIn('sd');
143
    }
144
}
145