Completed
Push — master ( 58b8f7...b71da8 )
by Asmir
23s queued 20s
created

UnionDiscriminator::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace JMS\Serializer\Annotation;
6
7
/**
8
 * @Annotation
9
 * @Target({"PROPERTY"})
10
 */
11
#[\Attribute(\Attribute::TARGET_PROPERTY)]
12
final class UnionDiscriminator implements SerializerAttribute
13
{
14
    use AnnotationUtilsTrait;
15
16
    /** @var array<string> */
17
    public $map = [];
18
19
    /** @var string */
20
    public $field = 'type';
21
22
    public function __construct(array $values = [], string $field = 'type', array $map = [])
23
    {
24
        $this->loadAnnotationParameters(get_defined_vars());
25
    }
26
}
27