Completed
Pull Request — master (#13)
by Hyunwoo
08:12 queued 02:24
created

InvalidArgumentException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 10
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A fromKeyAndInvalidTTL() 0 7 1
1
<?php
2
namespace Roave\DoctrineSimpleCache;
3
4
use Psr\SimpleCache\InvalidArgumentException as PsrInvalidArgumentException;
5
6
class InvalidArgumentException extends \InvalidArgumentException implements PsrInvalidArgumentException
7
{
8
    public static function fromKeyAndInvalidTTL($key, $ttl): self
9
    {
10
        return new self(sprintf(
11
            'TTL for "%s" should be defined by an integer or a DateInterval object, but %s is given.',
12
            $key, gettype($ttl)
13
        ));
14
    }
15
}
16