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

Language   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
A getAlpha2() 0 3 1
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