We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Executor implements ExecutorInterface |
||
| 14 | { |
||
| 15 | /** @var PromiseAdapter */ |
||
| 16 | private $promiseAdapter; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritdoc} |
||
| 20 | */ |
||
| 21 | 84 | public function execute( |
|
| 22 | Schema $schema, |
||
| 23 | string $requestString, |
||
| 24 | $rootValue = null, |
||
| 25 | $contextValue = null, |
||
| 26 | $variableValues = null, |
||
| 27 | $operationName = null, |
||
| 28 | ?callable $fieldResolver = null, |
||
| 29 | ?array $validationRules = null |
||
| 30 | ): ExecutionResult { |
||
| 31 | 84 | if ($this->promiseAdapter && !$this->promiseAdapter instanceof PromiseAdapterInterface && !\is_callable([$this->promiseAdapter, 'wait'])) { |
|
| 32 | 1 | throw new \RuntimeException( |
|
| 33 | 1 | \sprintf( |
|
| 34 | 1 | 'PromiseAdapter should be an object instantiating "%s" or "%s" with a "wait" method.', |
|
| 35 | 1 | PromiseAdapterInterface::class, |
|
| 36 | 1 | PromiseAdapter::class |
|
| 37 | ) |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | 83 | return $this->promiseAdapter->wait(GraphQL::promiseToExecute($this->promiseAdapter, ...\func_get_args())); |
|
|
|
|||
| 42 | } |
||
| 43 | |||
| 44 | 103 | public function setPromiseAdapter(PromiseAdapter $promiseAdapter): void |
|
| 47 | 103 | } |
|
| 48 | } |
||
| 49 |