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

Unsafe::getCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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