ExternalDocs   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
use Apie\CommonValueObjects\Url;
7
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
8
use Apie\OpenapiSchema\ValueObjects\SpecificationExtension;
9
use Apie\ValueObjects\ValueObjectInterface;
10
11
class ExternalDocs implements ValueObjectInterface
12
{
13
    use CompositeValueObjectWithExtension;
0 ignored issues
show
Bug introduced by
The trait Apie\OpenapiSchema\Conce...alueObjectWithExtension requires the property $name which is not provided by Apie\OpenapiSchema\Spec\ExternalDocs.
Loading history...
14
15
    /**
16
     * @var string|null
17
     */
18
    private $description;
19
20
    /**
21
     * @var Url|null
22
     */
23
    private $url;
24
25
    public function __construct(Url $url, ?string $description = null)
26
    {
27
        $this->url = $url;
28
        $this->description = $description;
29
        $this->specificationExtension = new SpecificationExtension([]);
30
    }
31
}
32