HasKraDaiVerboseMethods   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
getTranslationIn() 0 1 ?
A inLao() 0 4 1
A inThai() 0 4 1
1
<?php
2
3
namespace ChinLeung\VerboseLocalization\Concerns;
4
5
trait HasKraDaiVerboseMethods
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 Lao.
17
     *
18
     * @return mixed
19
     */
20
    public function inLao()
21
    {
22
        return $this->getTranslationIn('lo');
23
    }
24
25
    /**
26
     * Function to retrieve the translation in Thai.
27
     *
28
     * @return mixed
29
     */
30
    public function inThai()
31
    {
32
        return $this->getTranslationIn('th');
33
    }
34
}
35