Passed
Push — main ( d24563...3b4045 )
by Vasil
03:12
created

Country::fromArray2()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 12

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
rs 10
ccs 0
cts 0
cp 0
cc 3
nc 3
nop 1
crap 12
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Econt\Model;
6
7
use JMS\Serializer\Annotation as Serializer;
8
9
readonly class Country
10
{
11 4
    public function __construct(
12
        #[Serializer\Type('int')]
13
        public ?int $id,
14
15
        #[Serializer\Type('string')]
16
        public ?string $code2,
17
18
        #[Serializer\Type('string')]
19
        public ?string $code3,
20
21
        #[Serializer\Type('string')]
22
        public ?string $name,
23
24
        #[Serializer\Type('string')]
25
        public ?string $nameEn,
26
27
        #[Serializer\Type('bool')]
28
        public ?bool $isEU
29
    ) {
30 4
    }
31
}
32