Completed
Push — master ( bbe544...1bc078 )
by ReliQ
03:23 queued 11s
created

Standard::getPhrases()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ReliqArts\DirectTranslator\Vocabulary;
6
7
use ReliqArts\DirectTranslator\Vocabulary;
8
9
final class Standard implements Vocabulary
10
{
11
    /**
12
     * @var string
13
     */
14
    private $name;
15
16
    /**
17
     * @var string
18
     */
19
    private $languageCode;
20
21
    /**
22
     * @var string[]
23
     */
24
    private $phrases;
25
26
    /**
27
     * @var string[]
28
     */
29
    private $words;
30
31
    /**
32
     * Vocabulary constructor.
33
     *
34
     * @param string $name
35
     * @param array  $phrases
36
     * @param array  $words
37
     * @param string $languageCode
38
     */
39
    public function __construct(string $name, array $phrases, array $words, string $languageCode)
40
    {
41
        $this->name = $name;
42
        $this->languageCode = $languageCode;
43
        $this->phrases = $phrases;
44
        $this->words = $words;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getName(): string
51
    {
52
        return $this->name;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getLanguageCode(): string
59
    {
60
        return $this->languageCode;
61
    }
62
63
    /**
64
     * @return string[]
65
     */
66
    public function getPhrases(): array
67
    {
68
        return $this->phrases;
69
    }
70
71
    /**
72
     * @return string[]
73
     */
74
    public function getWords(): array
75
    {
76
        return $this->words;
77
    }
78
79
    /**
80
     * {@inheritdoc}
81
     */
82
    public function jsonSerialize(): array
83
    {
84
        return (array)$this;
85
    }
86
}
87