ExternalDocs::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
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