Completed
Push — master ( b65b29...f39982 )
by Tobias
03:16 queued 01:01
created

LoginError::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Happyr\LinkedIn\Exception;
4
5
/**
6
 * Class LoginError.
7
 *
8
 * @author Tobias Nyholm
9
 */
10
class LoginError
11
{
12
    /**
13
     * @var string name
14
     */
15
    protected $name;
16
17
    /**
18
     * @var string description
19
     */
20
    protected $description;
21
22
    /**
23
     * @param string $name
24
     * @param string $description
25
     */
26
    public function __construct($name, $description)
27
    {
28
        $this->name = $name;
29
        $this->description = $description;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getName()
36
    {
37
        return $this->name;
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getDescription()
44
    {
45
        return $this->description;
46
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function __toString()
52
    {
53
        return sprintf('Name: %s, Description: %s', $this->getName(), $this->getDescription());
54
    }
55
}
56