UnexpectedTypeException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
1
<?php
2
3
namespace Rey\BitrixMigrations\Exception;
4
5
/**
6
 * UnexpectedTypeException called when passed type does not match
7
 *
8
 * Symfony Like
9
 */
10
class UnexpectedTypeException extends InvalidArgumentException
11
{
12
    public function __construct($value, $expectedType)
13
    {
14
        parent::__construct(sprintf('Expected argument must be "%s" type, "%s" given', $expectedType, is_object($value)?get_class($value):gettype($value)));
15
    }
16
}
17