Completed
Pull Request — master (#146)
by
unknown
03:57
created

InvalidErrorHandlerPluginException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A forPlugin() 0 7 2
1
<?php
2
3
namespace Youshido\GraphQL\Exception;
4
5
class InvalidErrorHandlerPluginException extends \InvalidArgumentException
6
{
7
    public static function forPlugin($plugin)
8
    {
9
        return new static(sprintf(
10
            'Cannot add "%s" to the error handler chain, it does not implement the ErrorHandlerPluginInterface interface.',
11
            is_object($plugin) ? get_class($plugin) : gettype($plugin)
12
        ));
13
    }
14
}
15