Contact   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 2
Bugs 1 Features 1
Metric Value
eloc 8
c 2
b 1
f 1
dl 0
loc 41
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 3 1
A getEmail() 0 3 1
A getName() 0 3 1
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
use Apie\CommonValueObjects\Email;
7
use Apie\CommonValueObjects\Url;
8
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
9
use Apie\OpenapiSchema\Contract\ContactContract;
10
use Apie\ValueObjects\ValueObjectInterface;
11
12
/**
13
 * @see https://swagger.io/specification/#contact-object
14
 */
15
class Contact implements ValueObjectInterface, ContactContract
16
{
17
    use CompositeValueObjectWithExtension;
18
19
    /**
20
     * @var string|null
21
     */
22
    private $name;
23
24
    /**
25
     * @var Url|null
26
     */
27
    private $url;
28
29
    /**
30
     * @var Email|null
31
     */
32
    private $email;
33
34
    /**
35
     * @return string|null
36
     */
37
    public function getName(): ?string
38
    {
39
        return $this->name;
40
    }
41
42
    /**
43
     * @return string|null
44
     */
45
    public function getUrl(): ?string
46
    {
47
        return $this->url;
48
    }
49
50
    /**
51
     * @return string|null
52
     */
53
    public function getEmail(): ?string
54
    {
55
        return $this->email;
56
    }
57
}
58