Completed
Push — master ( dcdeb9...df0c28 )
by Дмитрий
03:33 queued 02:02
created

InvalidResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 28
ccs 4
cts 6
cp 0.6667
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResponse() 0 4 1
1
<?php
2
/**
3
 * SocialConnect project
4
 * @author: Patsura Dmitry https://github.com/ovr <[email protected]>
5
 */
6
7
namespace SocialConnect\Provider\Exception;
8
9
class InvalidResponse extends \SocialConnect\Common\Exception
10
{
11
    /**
12
     * @var mixed
13
     */
14
    protected $response;
15
16
    /**
17
     * @param string $message
18
     * @param mixed $response
19
     */
20 56
    public function __construct($message = 'API bad response', $response = null)
21
    {
22 56
        parent::__construct($message);
23
24 56
        $this->response = $response;
25 56
    }
26
27
    /**
28
     * Get response data.
29
     *
30
     * @return mixed
31
     */
32
    public function getResponse()
33
    {
34
        return $this->response;
35
    }
36
}
37