ProjectLanguage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 5
rs 10
1
<?php // Copyright ⓒ 2018 Magneds IP B.V. - All Rights Reserved
2
namespace Magneds\Lokalise\Language\Entity;
3
4
class ProjectLanguage
5
{
6
    /**
7
     * @var Language
8
     */
9
    protected $language;
10
11
    /**
12
     * @var int
13
     */
14
    protected $words;
15
16
    /**
17
     * @var boolean
18
     */
19
    protected $default;
20
21
    /**
22
     * ProjectLanguage constructor.
23
     * @param Language $language
24
     * @param int $words
25
     * @param bool $default
26
     */
27
    public function __construct(Language $language, int $words, bool $default)
28
    {
29
        $this->language = $language;
30
        $this->words    = $words;
31
        $this->default  = $default;
32
    }
33
34
    /**
35
     * @return Language
36
     */
37
    public function getLanguage(): Language
38
    {
39
        return $this->language;
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function getWords(): int
46
    {
47
        return $this->words;
48
    }
49
50
    /**
51
     * @return bool
52
     */
53
    public function isDefault(): bool
54
    {
55
        return $this->default;
56
    }
57
}
58