Completed
Push — master ( ed931d...d2bebe )
by Pavel
02:45
created

ConditionException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A unsupportedArgumentToMatch() 0 10 2
1
<?php
2
3
namespace Bankiru\Seo\Exception;
4
5
use Bankiru\Seo\ConditionInterface;
6
7
class ConditionException extends \RuntimeException implements SeoExceptionInterface
8
{
9 1
    public static function unsupportedArgumentToMatch(ConditionInterface $condition, $argument)
10
    {
11 1
        return new static(
12 1
            sprintf(
13 1
                '%s cannot match argument of type %s',
14 1
                get_class($condition),
15 1
                is_object($argument) ? get_class($argument) : gettype($argument)
16 1
            )
17 1
        );
18
    }
19
}
20