UnsupportedObjectException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
3
declare (strict_types=1);
4
5
namespace Oxidmod\RestBundle\Transformer\Exception;
6
7
/**
8
 * Exception thrown if try to transform unsupported object
9
 */
10
class UnsupportedObjectException extends \LogicException
11
{
12
    /**
13
     * @param mixed $object
14
     */
15
    public function __construct($object)
16
    {
17
        parent::__construct(
18
            sprintf(
19
                'Transformer for "%s" not found.',
20
                is_object($object) ? get_class($object) : gettype($object)
21
            )
22
        );
23
    }
24
}
25