RequestState   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 67
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 6
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 67
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setDestination() 0 4 1
A getDestination() 0 4 1
A setId() 0 4 1
A getId() 0 4 1
A serialize() 0 4 1
A unserialize() 0 4 1
1
<?php
2
3
namespace AerialShip\SamlSPBundle\State\Request;
4
5
class RequestState implements \Serializable
6
{
7
    /** @var  string */
8
    private $id;
9
10
    /** @var  string */
11
    private $destination;
12
13
14
    /**
15
     * @param string $destination
16
     */
17
    public function setDestination($destination)
18
    {
19
        $this->destination = $destination;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getDestination()
26
    {
27
        return $this->destination;
28
    }
29
30
    /**
31
     * @param string $id
32
     */
33
    public function setId($id)
34
    {
35
        $this->id = $id;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getId()
42
    {
43
        return $this->id;
44
    }
45
46
47
    /**
48
     * (PHP 5 &gt;= 5.1.0)<br/>
49
     * String representation of object
50
     * @link http://php.net/manual/en/serializable.serialize.php
51
     * @return string the string representation of the object or null
52
     */
53
    public function serialize()
54
    {
55
        return serialize(array($this->id, $this->destination));
56
    }
57
58
    /**
59
     * (PHP 5 &gt;= 5.1.0)<br/>
60
     * Constructs the object
61
     * @link http://php.net/manual/en/serializable.unserialize.php
62
     * @param string $serialized <p>
63
     * The string representation of the object.
64
     * </p>
65
     * @return void
66
     */
67
    public function unserialize($serialized)
68
    {
69
        list($this->id, $this->destination) = unserialize($serialized);
70
    }
71
}
72