Passed
Pull Request — master (#302)
by Christoffer
03:31 queued 01:04
created

SyntaxErrorException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\GraphQL\Language;
4
5
use Digia\GraphQL\Error\GraphQLException;
6
7
class SyntaxErrorException extends GraphQLException
8
{
9
    /**
10
     * SyntaxErrorException constructor.
11
     * @param Source $source
12
     * @param int    $position
13
     * @param string $description
14
     */
15
    public function __construct(Source $source, int $position, string $description)
16
    {
17
        parent::__construct(
18
            sprintf('Syntax Error: %s', $description),
19
            null,
20
            $source,
21
            [$position]
22
        );
23
    }
24
}
25