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

InvalidErrorHandlerPluginException::forPlugin()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 1
nop 1
crap 6
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