Identity   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 58
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A setType() 0 6 1
A getEndpoint() 0 4 1
A setEndpoint() 0 6 1
1
<?php
2
/*
3
 * This file is part of the FreshSinchBundle
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\SinchBundle\Model;
14
15
use Symfony\Component\Validator\Constraints as Assert;
16
17
/**
18
 * Identity Model.
19
 *
20
 * @author Artem Henvald <[email protected]>
21
 *
22
 * @see https://www.sinch.com/docs/sms/#incomingsms
23
 */
24
class Identity
25
{
26
    /**
27
     * @var string
28
     *
29
     * @Assert\NotNull(message="Type cannot be null.")
30
     * @Assert\Type(type="string")
31
     */
32
    private $type;
33
34
    /**
35
     * @var string
36
     *
37
     * @Assert\NotNull(message="Endpoint cannot be null.")
38
     * @Assert\Type(type="string")
39
     */
40
    private $endpoint;
41
42
    /**
43
     * @return string|null
44
     */
45
    public function getType(): ?string
46
    {
47
        return $this->type;
48
    }
49
50
    /**
51
     * @param string $type
52
     *
53
     * @return $this
54
     */
55
    public function setType(string $type): self
56
    {
57
        $this->type = $type;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @return string|null
64
     */
65
    public function getEndpoint(): ?string
66
    {
67
        return $this->endpoint;
68
    }
69
70
    /**
71
     * @param string $endpoint
72
     *
73
     * @return $this
74
     */
75
    public function setEndpoint(string $endpoint): self
76
    {
77
        $this->endpoint = $endpoint;
78
79
        return $this;
80
    }
81
}
82