Product::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 5
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Sunrise\Hydrator\Tests\Fixture\Store;
6
7
use DateTimeImmutable;
8
use Sunrise\Hydrator\Annotation\Format;
9
use Sunrise\Hydrator\Annotation\Relationship;
10
11
final class Product
12
{
13
    public function __construct(
14
        public readonly string $name,
15
        public readonly Category $category,
16
        #[Relationship(Tag::class)]
17
        public readonly array $tags,
18
        public readonly Status $status,
19
        #[Format('Y-m-d H:i:s')]
20
        public readonly DateTimeImmutable $createdAt = new DateTimeImmutable('2020-01-01 12:00:00'),
21
    ) {
22
    }
23
}
24