HasTurkicVerboseMethods   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 60
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
getTranslationIn() 0 1 ?
A inAzerbaijani() 0 4 1
A inKazakh() 0 4 1
A inKyrgyz() 0 4 1
A inTurkish() 0 4 1
A inUzbek() 0 4 1
1
<?php
2
3
namespace ChinLeung\VerboseLocalization\Concerns;
4
5
trait HasTurkicVerboseMethods
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 Azerbaijani.
17
     *
18
     * @return mixed
19
     */
20
    public function inAzerbaijani()
21
    {
22
        return $this->getTranslationIn('az');
23
    }
24
25
    /**
26
     * Function to retrieve the translation in Kazakh.
27
     *
28
     * @return mixed
29
     */
30
    public function inKazakh()
31
    {
32
        return $this->getTranslationIn('kk');
33
    }
34
35
    /**
36
     * Function to retrieve the translation in Kyrgyz.
37
     *
38
     * @return mixed
39
     */
40
    public function inKyrgyz()
41
    {
42
        return $this->getTranslationIn('ky');
43
    }
44
45
    /**
46
     * Function to retrieve the translation in Turkish.
47
     *
48
     * @return mixed
49
     */
50
    public function inTurkish()
51
    {
52
        return $this->getTranslationIn('tr');
53
    }
54
55
    /**
56
     * Function to retrieve the translation in Uzbek.
57
     *
58
     * @return mixed
59
     */
60
    public function inUzbek()
61
    {
62
        return $this->getTranslationIn('uz');
63
    }
64
}
65