Completed
Push — master ( 84b0d6...bfba9a )
by Janusz
02:28 queued 36s
created

Sender::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Ittoolspl\Smslabs\Entity;
4
5
class Sender
6
{
7
    private $id;
8
    private $name;
9
    private $sender;
10
11
    /**
12
     * Sender constructor.
13
     * @param string $id
14
     * @param string $name
15
     * @param string $sender
16
     */
17 1
    public function __construct($id, $name, $sender)
18
    {
19 1
        $this->id     = $id;
20 1
        $this->name   = $name;
21 1
        $this->sender = $sender;
22 1
    }
23
24
    /**
25
     * @param array $response
26
     * @return Sender
27
     */
28 1
    public static function createFromResponseArray(array $response)
29
    {
30 1
        return new self(
31 1
            $response['id'],
32 1
            $response['name'],
33 1
            $response['sender']
34 1
        );
35
    }
36
37
    /**
38
     * @return string
39
     */
40 1
    public function getId()
41
    {
42 1
        return $this->id;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 1
    public function getName()
49
    {
50 1
        return $this->name;
51
    }
52
53
    /**
54
     * @return string
55
     */
56 1
    public function getSender()
57
    {
58 1
        return $this->sender;
59
    }
60
}
61