Info::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
7
use Apie\OpenapiSchema\Contract\ContactContract;
8
use Apie\OpenapiSchema\Contract\InfoContract;
9
use Apie\OpenapiSchema\Contract\LicenseContract;
10
11
final class Info implements InfoContract
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\Info.
Loading history...
14
15
    /**
16
     * @var string
17
     */
18
    private $title;
19
20
    /**
21
     * @var string|null
22
     */
23
    private $description;
24
25
    /**
26
     * @var string
27
     */
28
    private $version;
29
30
    /**
31
     * @var string|null
32
     */
33
    private $termsOfService;
34
35
    /**
36
     * @var ContactContract|Contact|null
37
     */
38
    private $contact;
39
40
    /**
41
     * @var LicenseContract|License|null
42
     */
43
    private $license;
44
45
    public function __construct(string $title, string $version)
46
    {
47
        $this->title = $title;
48
        $this->version = $version;
49
    }
50
51
    public function getTitle(): string
52
    {
53
        return $this->title;
54
    }
55
56
    public function getDescription(): ?string
57
    {
58
        return $this->description;
59
    }
60
61
    public function getTermsOfService(): ?string
62
    {
63
        return $this->termsOfService;
64
    }
65
66
    public function getContact(): ?ContactContract
67
    {
68
        return $this->contact;
69
    }
70
71
    public function getLicense(): ?LicenseContract
72
    {
73
        return $this->license;
74
    }
75
76
    public function getVersion(): string
77
    {
78
        return $this->version;
79
    }
80
}
81