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
![]() |
|||
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 |