Completed
Push — master ( 58b8f7...b71da8 )
by Asmir
17s queued 15s
created

UnionDiscriminator   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

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