Completed
Push — master ( 46f89e...ea4efb )
by Janusz
09:47
created

Sender::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
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
    public function __construct($id, $name, $sender)
18
    {
19
        $this->id     = $id;
20
        $this->name   = $name;
21
        $this->sender = $sender;
22
    }
23
24
    public static function createFromResponseObject(\stdClass $respObj)
25
    {
26
        return new self(
27
            $respObj->id,
28
            $respObj->name,
29
            $respObj->sender
30
        );
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getId()
37
    {
38
        return $this->id;
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getName()
45
    {
46
        return $this->name;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getSender()
53
    {
54
        return $this->sender;
55
    }
56
}
57