Discriminator   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 5
c 2
b 1
f 1
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
use Apie\CompositeValueObjects\CompositeValueObjectTrait;
7
use Apie\OpenapiSchema\Map\DiscriminatorMapping;
8
use Apie\ValueObjects\ValueObjectInterface;
9
10
/**
11
 * @see https://swagger.io/specification/#discriminator-object
12
 */
13
class Discriminator implements ValueObjectInterface
14
{
15
    use CompositeValueObjectTrait;
0 ignored issues
show
Bug introduced by
The trait Apie\CompositeValueObjec...mpositeValueObjectTrait requires the property $name which is not provided by Apie\OpenapiSchema\Spec\Discriminator.
Loading history...
16
17
    /**
18
     * @var string
19
     */
20
    private $propertyName;
21
22
    /**
23
     * @var null|DiscriminatorMapping
24
     */
25
    private $mapping;
0 ignored issues
show
introduced by
The private property $mapping is not used, and could be removed.
Loading history...
26
27
    public function __construct(string $propertyName)
28
    {
29
        $this->propertyName = $propertyName;
30
    }
31
}
32