ClassDiscriminatorMapping   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getProperty() 0 3 1
A __construct() 0 4 1
A getMapValue() 0 3 1
1
<?php
2
/**
3
 * Schema Validator
4
 *
5
 * @author Vlad Shashkov <[email protected]>
6
 * @copyright Copyright (c) 2021, The Myaza Software
7
 */
8
9
declare(strict_types=1);
10
11
namespace SchemaValidator\Metadata;
12
13
/**
14
 * @codeCoverageIgnore
15
 */
16
final class ClassDiscriminatorMapping
17
{
18
    /**
19
     * ClassDiscriminatorMapping constructor.
20
     *
21
     * @param array<string> $mapValue
22
     */
23
    public function __construct(
24
        private array $mapValue,
25
        private Property $property,
26
    ) {
27
    }
28
29
    /**
30
     * @return string[]
31
     */
32
    public function getMapValue(): array
33
    {
34
        return $this->mapValue;
35
    }
36
37
    public function getProperty(): Property
38
    {
39
        return $this->property;
40
    }
41
}
42