Completed
Push — master ( 58f7a7...7b934b )
by David
9s
created

TDBMInvalidArgumentException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A badType() 0 3 1
1
<?php
2
3
namespace TheCodingMachine\TDBM;
4
5
class TDBMInvalidArgumentException extends \InvalidArgumentException
6
{
7
    /**
8
     * @param mixed $value
9
     */
10
    public static function badType(string $expectedType, $value, string $location): self
11
    {
12
        return new self("Invalid argument passed to '$location'. Expecting a $expectedType. Got a ".gettype($value).'.');
13
    }
14
}
15