We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
21 | class Executor |
||
22 | { |
||
23 | const PROMISE_ADAPTER_SERVICE_ID = 'overblog_graphql.promise_adapter'; |
||
24 | |||
25 | /** @var Schema[] */ |
||
26 | private $schemas; |
||
27 | |||
28 | /** @var EventDispatcherInterface|null */ |
||
29 | private $dispatcher; |
||
30 | |||
31 | /** @var ExecutorInterface */ |
||
32 | private $executor; |
||
33 | |||
34 | /** @var PromiseAdapter */ |
||
35 | private $promiseAdapter; |
||
36 | |||
37 | /** @var callable|null */ |
||
38 | private $defaultFieldResolver; |
||
39 | |||
40 | 77 | public function __construct( |
|
41 | ExecutorInterface $executor, |
||
42 | EventDispatcherInterface $dispatcher, |
||
43 | PromiseAdapter $promiseAdapter = null, |
||
44 | callable $defaultFieldResolver = null |
||
45 | ) { |
||
46 | 77 | $this->executor = $executor; |
|
47 | 77 | $this->dispatcher = $dispatcher; |
|
48 | 77 | $this->promiseAdapter = $promiseAdapter; |
|
49 | 77 | $this->defaultFieldResolver = $defaultFieldResolver; |
|
50 | 77 | } |
|
51 | |||
52 | 2 | public function setExecutor(ExecutorInterface $executor) |
|
53 | { |
||
54 | 2 | $this->executor = $executor; |
|
55 | |||
56 | 2 | return $this; |
|
57 | } |
||
58 | |||
59 | 1 | public function setPromiseAdapter(PromiseAdapter $promiseAdapter = null) |
|
60 | { |
||
61 | 1 | $this->promiseAdapter = $promiseAdapter; |
|
62 | |||
63 | 1 | return $this; |
|
64 | } |
||
65 | |||
66 | /** |
||
67 | * @param string $name |
||
68 | * @param Schema $schema |
||
69 | * |
||
70 | * @return $this |
||
71 | */ |
||
72 | 69 | public function addSchema($name, Schema $schema) |
|
78 | |||
79 | /** |
||
80 | * @param string|null $name |
||
81 | * |
||
82 | * @return Schema |
||
83 | */ |
||
84 | 65 | public function getSchema($name = null) |
|
101 | |||
102 | 73 | public function setMaxQueryDepth($maxQueryDepth) |
|
108 | |||
109 | 73 | public function setMaxQueryComplexity($maxQueryComplexity) |
|
115 | |||
116 | /** |
||
117 | * @param null|string $schemaName |
||
118 | * @param array $request |
||
119 | * @param null|array|\ArrayObject|object $rootValue |
||
120 | * @param null|array|\ArrayObject|object $contextValue |
||
121 | * |
||
122 | * @return ExecutionResult |
||
123 | */ |
||
124 | 63 | public function execute($schemaName, array $request, $rootValue = null, $contextValue = null) |
|
148 | |||
149 | /** |
||
150 | * @param Schema $schema |
||
151 | * @param string $requestString |
||
152 | * @param \ArrayObject $rootValue |
||
153 | * @param \ArrayObject $contextValue |
||
154 | * @param array|null $variableValue |
||
155 | * @param string|null $operationName |
||
156 | * |
||
157 | * @return ExecutorEvent |
||
158 | */ |
||
159 | 62 | private function preExecute( |
|
180 | |||
181 | /** |
||
182 | * @param ExecutionResult|Promise $result |
||
183 | * |
||
184 | * @return ExecutionResult |
||
185 | */ |
||
186 | 61 | private function postExecute($result) |
|
201 | |||
202 | 62 | private function checkPromiseAdapter() |
|
214 | |||
215 | 61 | private function checkExecutionResult($result) |
|
223 | |||
224 | 62 | private static function createArrayObject($data) |
|
234 | } |
||
235 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: