Passed
Push — master ( 319fcb...7a107a )
by Rafael
04:41
created

ForbiddenObjectException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 11
c 0
b 0
f 0
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Exception\GraphQL;
12
13
use Ynlo\GraphQLBundle\Definition\DefinitionInterface;
14
15
class ForbiddenObjectException extends SecurityException
16
{
17
    public function __construct(DefinitionInterface $object, $message = null)
18
    {
19
        if (!$message) {
20
            $message = sprintf(
21
                'Does not have enough permissions to get this %s',
22
                $object->getName()
23
            );
24
        }
25
        parent::__construct($message);
26
    }
27
}
28