MailxpertApp::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * sources.
4
 * Date: 14/08/15
5
 */
6
7
namespace Mailxpert;
8
9
/**
10
 * Class MailxpertApp
11
 * @package Mailxpert
12
 */
13
class MailxpertApp
14
{
15
    /**
16
     * @var string The app ID.
17
     */
18
    private $id;
19
20
    /**
21
     * @var string The app secret.
22
     */
23
    private $secret;
24
25
    /**
26
     * @param string $id
27
     * @param string $secret
28
     */
29
    public function __construct($id, $secret)
30
    {
31
        $this->id = $id;
32
        $this->secret = $secret;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getId()
39
    {
40
        return $this->id;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function getSecret()
47
    {
48
        return $this->secret;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function serialize()
55
    {
56
        return serialize([$this->id, $this->secret]);
57
    }
58
59
    /**
60
     * @param string $serialized
61
     */
62
    public function unserialize($serialized)
63
    {
64
        list($id, $secret) = unserialize($serialized);
65
66
        $this->__construct($id, $secret);
67
    }
68
}
69