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

LoginError   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 46
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getDescription() 0 4 1
A __toString() 0 4 1
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