NotSupportedInputForDataMapperException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 2
1
<?php
2
3
namespace Thruster\Component\DataMapper\Exception;
4
5
use Thruster\Component\DataMapper\DataMapperInterface;
6
7
/**
8
 * Class NotSupportedInputForDataMapperException
9
 *
10
 * @package Thruster\Component\DataMapper\Exception
11
 * @author  Aurimas Niekis <[email protected]>
12
 */
13
class NotSupportedInputForDataMapperException extends \Exception
14
{
15
    /**
16
     * @inheritDoc
17
     */
18 1
    public function __construct($input, DataMapperInterface $dataMapper)
19
    {
20 1
        $message = sprintf(
21 1
            'DataMapper "%s" does not support input type "%s"',
22
            get_class($dataMapper),
23 1
            is_object($input) ? get_class($input) : gettype($input)
24
        );
25
26 1
        parent::__construct($message);
27 1
    }
28
}
29