Passed
Pull Request — master (#71)
by David
03:02
created

TDBMInvalidArgumentException::badType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 3
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