Discriminator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 20
rs 10
c 0
b 0
f 0
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("CLASS")
10
 */
11
#[\Attribute(\Attribute::TARGET_CLASS)]
12
class Discriminator implements SerializerAttribute
13
{
14
    use AnnotationUtilsTrait;
15
16
    /** @var array<string> */
17
    public $map = [];
18
19
    /** @var string */
20
    public $field = 'type';
21
22
    /** @var bool */
23
    public $disabled = false;
24
25
    /** @var string[] */
26
    public $groups = [];
27
28
    public function __construct(array $values = [], string $field = 'type', array $groups = [], array $map = [], bool $disabled = false)
29
    {
30
        $this->loadAnnotationParameters(get_defined_vars());
31
    }
32
}
33