Passed
Pull Request — 4.0 (#55)
by
unknown
02:45
created

Language::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 7
dl 0
loc 11
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sokil\IsoCodes\Database\LanguagesAlpha2;
6
7
use Sokil\IsoCodes\TranslationDriver\TranslatorInterface;
8
9
class Language extends \Sokil\IsoCodes\Database\Languages\Language
10
{
11
    /** @var string */
12
    private $alpha2;
13
14
    public function __construct(
15
        TranslatorInterface $translator,
16
        string $name,
17
        string $alpha2,
18
        string $alpha3,
19
        string $scope,
20
        string $type,
21
        ?string $invertedName = null
22
    ) {
23
        parent::__construct($translator, $name, $alpha3, $scope, $type, $invertedName, $alpha2);
24
        $this->alpha2 = $alpha2;
25
    }
26
27
    public function getAlpha2(): string
28
    {
29
        return $this->alpha2;
30
    }
31
}
32