MissingResponseException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of Transfer.
5
 *
6
 * For the full copyright and license information, please view the LICENSE file located
7
 * in the root directory.
8
 */
9
10
namespace Transfer\Exception;
11
12
use Transfer\Adapter\SourceAdapterInterface;
13
use Transfer\Adapter\TargetAdapterInterface;
14
15
/**
16
 * Exception class for cases when a response is missing.
17
 */
18
class MissingResponseException extends \Exception
19
{
20
    /**
21
     * @param SourceAdapterInterface|TargetAdapterInterface $adapter Adapter object
22
     */
23 2
    public function __construct($adapter)
24
    {
25 2
        if (is_object($adapter)) {
26 2
            $adapter = get_class($adapter);
27 2
        }
28
29 2
        parent::__construct(sprintf('Adapter %s must return a Response, null given', $adapter));
30 2
    }
31
}
32