We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
28 | class Executor |
||
29 | { |
||
30 | private $schema; |
||
31 | |||
32 | /** |
||
33 | * @var EventDispatcherInterface|null |
||
34 | */ |
||
35 | private $dispatcher; |
||
36 | |||
37 | /** @var bool */ |
||
38 | private $throwException; |
||
39 | |||
40 | /** @var ErrorHandler|null */ |
||
41 | private $errorHandler; |
||
42 | |||
43 | /** @var callable[] */ |
||
44 | private $validationRules; |
||
45 | |||
46 | 36 | public function __construct(Schema $schema, EventDispatcherInterface $dispatcher = null, $throwException = false, ErrorHandler $errorHandler = null) |
|
47 | { |
||
48 | 36 | $this->schema = $schema; |
|
49 | 36 | $this->dispatcher = $dispatcher; |
|
50 | 36 | $this->throwException = (bool) $throwException; |
|
51 | 36 | $this->errorHandler = $errorHandler; |
|
52 | 36 | $this->validationRules = DocumentValidator::allRules(); |
|
53 | 36 | } |
|
54 | |||
55 | 36 | public function addValidatorRule(callable $validatorRule) |
|
59 | |||
60 | /** |
||
61 | * @param bool $throwException |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | 23 | public function setThrowException($throwException) |
|
71 | |||
72 | 36 | public function execute(array $data, array $context = []) |
|
94 | |||
95 | 36 | private function executeAndReturnResult(Schema $schema, $requestString, $rootValue = null, $variableValues = null, $operationName = null) |
|
114 | } |
||
115 |