Passed
Push — master ( 85f4c7...6bdead )
by Vladimir
03:17
created

Unsafe   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isClientSafe() 0 3 1
A getCategory() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQL\Tests\Server;
6
7
use GraphQL\Error\ClientAware;
8
9
class Unsafe extends \Exception implements ClientAware
10
{
11
    /**
12
     * Returns true when exception message is safe to be displayed to a client.
13
     *
14
     * @api
15
     * @return bool
16
     */
17
    public function isClientSafe()
18
    {
19
        return false;
20
    }
21
22
    /**
23
     * Returns string describing a category of the error.
24
     *
25
     * Value "graphql" is reserved for errors produced by query parsing or validation, do not use it.
26
     *
27
     * @api
28
     * @return string
29
     */
30
    public function getCategory()
31
    {
32
        return 'unsafe';
33
    }
34
}
35