QueryException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 27
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getErrors() 0 4 1
1
<?php
2
namespace Arthem\GraphQLMapper\Exception;
3
4
use GraphQL\FormattedError;
5
6
class QueryException extends \RuntimeException
7
{
8
    /**
9
     * @var FormattedError[]
10
     */
11
    private $errors;
12
13
    /**
14
     * @param FormattedError[] $errors
15
     * @param string           $message
16
     * @param int              $code
17
     * @param \Exception|null  $previous
18
     */
19
    public function __construct(array $errors, $message = '', $code = 0, \Exception $previous = null)
20
    {
21
        parent::__construct($message, $code, $previous);
22
        $this->errors = $errors;
23
    }
24
25
    /**
26
     * @return FormattedError[]
27
     */
28
    public function getErrors()
29
    {
30
        return $this->errors;
31
    }
32
}
33