Passed
Push — 6.0 ( e6360e...a5ddb0 )
by Olivier
01:38
created

LocalizedTerritory::get_name()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace ICanBoogie\CLDR;
4
5
/**
6
 * A localized territory.
7
 *
8
 * @extends LocalizedObject<Territory>
9
 */
10
class LocalizedTerritory extends LocalizedObject
11
{
12
    /**
13
     * @var string The localized name of the territory.
14
     */
15
    public readonly string $name;
16
17
    public function __construct(Territory $target, Locale $locale)
18
    {
19
        $this->name = $locale['territories'][$target->code->value];
0 ignored issues
show
Bug introduced by
The property name is declared read-only in ICanBoogie\CLDR\LocalizedTerritory.
Loading history...
20
21
        parent::__construct($target, $locale);
22
    }
23
}
24