Conditions | 1 |
Paths | 1 |
Total Lines | 1005 |
Code Lines | 617 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
26 | public function testExecutesAnIntrospectionQuery() : void |
||
27 | { |
||
28 | $emptySchema = new Schema([ |
||
29 | 'query' => new ObjectType([ |
||
30 | 'name' => 'QueryRoot', |
||
31 | 'fields' => ['a' => Type::string()], |
||
32 | ]), |
||
33 | ]); |
||
34 | |||
35 | $request = Introspection::getIntrospectionQuery(['descriptions' => false]); |
||
36 | $expected = [ |
||
37 | 'data' => |
||
38 | [ |
||
39 | '__schema' => |
||
40 | [ |
||
41 | 'mutationType' => null, |
||
42 | 'subscriptionType' => null, |
||
43 | 'queryType' => |
||
44 | ['name' => 'QueryRoot'], |
||
45 | 'types' => |
||
46 | [ |
||
47 | [ |
||
48 | 'kind' => 'OBJECT', |
||
49 | 'name' => 'QueryRoot', |
||
50 | 'inputFields' => null, |
||
51 | 'interfaces' => |
||
52 | [], |
||
53 | 'enumValues' => null, |
||
54 | 'possibleTypes' => null, |
||
55 | 'fields' => [ |
||
56 | [ |
||
57 | 'name' => 'a', |
||
58 | 'args' => [], |
||
59 | 'type' => [ |
||
60 | 'kind' => 'SCALAR', |
||
61 | 'name' => 'String', |
||
62 | 'ofType' => null, |
||
63 | ], |
||
64 | 'isDeprecated' => false, |
||
65 | 'deprecationReason' => null, |
||
66 | ], |
||
67 | ], |
||
68 | ], |
||
69 | [ |
||
70 | 'kind' => 'SCALAR', |
||
71 | 'name' => 'String', |
||
72 | 'fields' => null, |
||
73 | 'inputFields' => null, |
||
74 | 'interfaces' => null, |
||
75 | 'enumValues' => null, |
||
76 | 'possibleTypes' => null, |
||
77 | ], |
||
78 | [ |
||
79 | 'kind' => 'SCALAR', |
||
80 | 'name' => 'ID', |
||
81 | 'fields' => null, |
||
82 | 'inputFields' => null, |
||
83 | 'interfaces' => null, |
||
84 | 'enumValues' => null, |
||
85 | 'possibleTypes' => null, |
||
86 | ], |
||
87 | [ |
||
88 | 'kind' => 'SCALAR', |
||
89 | 'name' => 'Float', |
||
90 | 'fields' => null, |
||
91 | 'inputFields' => null, |
||
92 | 'interfaces' => null, |
||
93 | 'enumValues' => null, |
||
94 | 'possibleTypes' => null, |
||
95 | ], |
||
96 | [ |
||
97 | 'kind' => 'SCALAR', |
||
98 | 'name' => 'Int', |
||
99 | 'fields' => null, |
||
100 | 'inputFields' => null, |
||
101 | 'interfaces' => null, |
||
102 | 'enumValues' => null, |
||
103 | 'possibleTypes' => null, |
||
104 | ], |
||
105 | [ |
||
106 | 'kind' => 'SCALAR', |
||
107 | 'name' => 'Boolean', |
||
108 | 'fields' => null, |
||
109 | 'inputFields' => null, |
||
110 | 'interfaces' => null, |
||
111 | 'enumValues' => null, |
||
112 | 'possibleTypes' => null, |
||
113 | ], |
||
114 | [ |
||
115 | 'kind' => 'OBJECT', |
||
116 | 'name' => '__Schema', |
||
117 | 'fields' => |
||
118 | [ |
||
119 | 0 => |
||
120 | [ |
||
121 | 'name' => 'types', |
||
122 | 'args' => |
||
123 | [], |
||
124 | 'type' => |
||
125 | [ |
||
126 | 'kind' => 'NON_NULL', |
||
127 | 'name' => null, |
||
128 | 'ofType' => |
||
129 | [ |
||
130 | 'kind' => 'LIST', |
||
131 | 'name' => null, |
||
132 | 'ofType' => |
||
133 | [ |
||
134 | 'kind' => 'NON_NULL', |
||
135 | 'name' => null, |
||
136 | 'ofType' => |
||
137 | [ |
||
138 | 'kind' => 'OBJECT', |
||
139 | 'name' => '__Type', |
||
140 | ], |
||
141 | ], |
||
142 | ], |
||
143 | ], |
||
144 | 'isDeprecated' => false, |
||
145 | 'deprecationReason' => null, |
||
146 | ], |
||
147 | 1 => |
||
148 | [ |
||
149 | 'name' => 'queryType', |
||
150 | 'args' => |
||
151 | [], |
||
152 | 'type' => |
||
153 | [ |
||
154 | 'kind' => 'NON_NULL', |
||
155 | 'name' => null, |
||
156 | 'ofType' => |
||
157 | [ |
||
158 | 'kind' => 'OBJECT', |
||
159 | 'name' => '__Type', |
||
160 | ], |
||
161 | ], |
||
162 | 'isDeprecated' => false, |
||
163 | 'deprecationReason' => null, |
||
164 | ], |
||
165 | [ |
||
166 | 'name' => 'mutationType', |
||
167 | 'args' => |
||
168 | [], |
||
169 | 'type' => |
||
170 | [ |
||
171 | 'kind' => 'OBJECT', |
||
172 | 'name' => '__Type', |
||
173 | ], |
||
174 | 'isDeprecated' => false, |
||
175 | 'deprecationReason' => null, |
||
176 | ], |
||
177 | [ |
||
178 | 'name' => 'subscriptionType', |
||
179 | 'args' => |
||
180 | [], |
||
181 | 'type' => |
||
182 | [ |
||
183 | 'kind' => 'OBJECT', |
||
184 | 'name' => '__Type', |
||
185 | ], |
||
186 | 'isDeprecated' => false, |
||
187 | 'deprecationReason' => null, |
||
188 | ], |
||
189 | [ |
||
190 | 'name' => 'directives', |
||
191 | 'args' => |
||
192 | [], |
||
193 | 'type' => |
||
194 | [ |
||
195 | 'kind' => 'NON_NULL', |
||
196 | 'name' => null, |
||
197 | 'ofType' => |
||
198 | [ |
||
199 | 'kind' => 'LIST', |
||
200 | 'name' => null, |
||
201 | 'ofType' => |
||
202 | [ |
||
203 | 'kind' => 'NON_NULL', |
||
204 | 'name' => null, |
||
205 | 'ofType' => |
||
206 | [ |
||
207 | 'kind' => 'OBJECT', |
||
208 | 'name' => '__Directive', |
||
209 | ], |
||
210 | ], |
||
211 | ], |
||
212 | ], |
||
213 | 'isDeprecated' => false, |
||
214 | 'deprecationReason' => null, |
||
215 | ], |
||
216 | ], |
||
217 | 'inputFields' => null, |
||
218 | 'interfaces' => |
||
219 | [], |
||
220 | 'enumValues' => null, |
||
221 | 'possibleTypes' => null, |
||
222 | ], |
||
223 | [ |
||
224 | 'kind' => 'OBJECT', |
||
225 | 'name' => '__Type', |
||
226 | 'fields' => |
||
227 | [ |
||
228 | 0 => |
||
229 | [ |
||
230 | 'name' => 'kind', |
||
231 | 'args' => |
||
232 | [], |
||
233 | 'type' => |
||
234 | [ |
||
235 | 'kind' => 'NON_NULL', |
||
236 | 'name' => null, |
||
237 | 'ofType' => |
||
238 | [ |
||
239 | 'kind' => 'ENUM', |
||
240 | 'name' => '__TypeKind', |
||
241 | ], |
||
242 | ], |
||
243 | 'isDeprecated' => false, |
||
244 | 'deprecationReason' => null, |
||
245 | ], |
||
246 | 1 => |
||
247 | [ |
||
248 | 'name' => 'name', |
||
249 | 'args' => |
||
250 | [], |
||
251 | 'type' => |
||
252 | [ |
||
253 | 'kind' => 'SCALAR', |
||
254 | 'name' => 'String', |
||
255 | ], |
||
256 | 'isDeprecated' => false, |
||
257 | 'deprecationReason' => null, |
||
258 | ], |
||
259 | 2 => |
||
260 | [ |
||
261 | 'name' => 'description', |
||
262 | 'args' => |
||
263 | [], |
||
264 | 'type' => |
||
265 | [ |
||
266 | 'kind' => 'SCALAR', |
||
267 | 'name' => 'String', |
||
268 | ], |
||
269 | 'isDeprecated' => false, |
||
270 | 'deprecationReason' => null, |
||
271 | ], |
||
272 | 3 => |
||
273 | [ |
||
274 | 'name' => 'fields', |
||
275 | 'args' => |
||
276 | [ |
||
277 | 0 => |
||
278 | [ |
||
279 | 'name' => 'includeDeprecated', |
||
280 | 'type' => |
||
281 | [ |
||
282 | 'kind' => 'SCALAR', |
||
283 | 'name' => 'Boolean', |
||
284 | ], |
||
285 | 'defaultValue' => 'false', |
||
286 | ], |
||
287 | ], |
||
288 | 'type' => |
||
289 | [ |
||
290 | 'kind' => 'LIST', |
||
291 | 'name' => null, |
||
292 | 'ofType' => |
||
293 | [ |
||
294 | 'kind' => 'NON_NULL', |
||
295 | 'name' => null, |
||
296 | 'ofType' => |
||
297 | [ |
||
298 | 'kind' => 'OBJECT', |
||
299 | 'name' => '__Field', |
||
300 | ], |
||
301 | ], |
||
302 | ], |
||
303 | 'isDeprecated' => false, |
||
304 | 'deprecationReason' => null, |
||
305 | ], |
||
306 | 4 => |
||
307 | [ |
||
308 | 'name' => 'interfaces', |
||
309 | 'args' => |
||
310 | [], |
||
311 | 'type' => |
||
312 | [ |
||
313 | 'kind' => 'LIST', |
||
314 | 'name' => null, |
||
315 | 'ofType' => |
||
316 | [ |
||
317 | 'kind' => 'NON_NULL', |
||
318 | 'name' => null, |
||
319 | 'ofType' => |
||
320 | [ |
||
321 | 'kind' => 'OBJECT', |
||
322 | 'name' => '__Type', |
||
323 | ], |
||
324 | ], |
||
325 | ], |
||
326 | 'isDeprecated' => false, |
||
327 | 'deprecationReason' => null, |
||
328 | ], |
||
329 | 5 => |
||
330 | [ |
||
331 | 'name' => 'possibleTypes', |
||
332 | 'args' => |
||
333 | [], |
||
334 | 'type' => |
||
335 | [ |
||
336 | 'kind' => 'LIST', |
||
337 | 'name' => null, |
||
338 | 'ofType' => |
||
339 | [ |
||
340 | 'kind' => 'NON_NULL', |
||
341 | 'name' => null, |
||
342 | 'ofType' => |
||
343 | [ |
||
344 | 'kind' => 'OBJECT', |
||
345 | 'name' => '__Type', |
||
346 | ], |
||
347 | ], |
||
348 | ], |
||
349 | 'isDeprecated' => false, |
||
350 | 'deprecationReason' => null, |
||
351 | ], |
||
352 | 6 => |
||
353 | [ |
||
354 | 'name' => 'enumValues', |
||
355 | 'args' => |
||
356 | [ |
||
357 | 0 => |
||
358 | [ |
||
359 | 'name' => 'includeDeprecated', |
||
360 | 'type' => |
||
361 | [ |
||
362 | 'kind' => 'SCALAR', |
||
363 | 'name' => 'Boolean', |
||
364 | ], |
||
365 | 'defaultValue' => 'false', |
||
366 | ], |
||
367 | ], |
||
368 | 'type' => |
||
369 | [ |
||
370 | 'kind' => 'LIST', |
||
371 | 'name' => null, |
||
372 | 'ofType' => |
||
373 | [ |
||
374 | 'kind' => 'NON_NULL', |
||
375 | 'name' => null, |
||
376 | 'ofType' => |
||
377 | [ |
||
378 | 'kind' => 'OBJECT', |
||
379 | 'name' => '__EnumValue', |
||
380 | ], |
||
381 | ], |
||
382 | ], |
||
383 | 'isDeprecated' => false, |
||
384 | 'deprecationReason' => null, |
||
385 | ], |
||
386 | 7 => |
||
387 | [ |
||
388 | 'name' => 'inputFields', |
||
389 | 'args' => |
||
390 | [], |
||
391 | 'type' => |
||
392 | [ |
||
393 | 'kind' => 'LIST', |
||
394 | 'name' => null, |
||
395 | 'ofType' => |
||
396 | [ |
||
397 | 'kind' => 'NON_NULL', |
||
398 | 'name' => null, |
||
399 | 'ofType' => |
||
400 | [ |
||
401 | 'kind' => 'OBJECT', |
||
402 | 'name' => '__InputValue', |
||
403 | ], |
||
404 | ], |
||
405 | ], |
||
406 | 'isDeprecated' => false, |
||
407 | 'deprecationReason' => null, |
||
408 | ], |
||
409 | 8 => |
||
410 | [ |
||
411 | 'name' => 'ofType', |
||
412 | 'args' => |
||
413 | [], |
||
414 | 'type' => |
||
415 | [ |
||
416 | 'kind' => 'OBJECT', |
||
417 | 'name' => '__Type', |
||
418 | ], |
||
419 | 'isDeprecated' => false, |
||
420 | 'deprecationReason' => null, |
||
421 | ], |
||
422 | ], |
||
423 | 'inputFields' => null, |
||
424 | 'interfaces' => |
||
425 | [], |
||
426 | 'enumValues' => null, |
||
427 | 'possibleTypes' => null, |
||
428 | ], |
||
429 | [ |
||
430 | 'kind' => 'ENUM', |
||
431 | 'name' => '__TypeKind', |
||
432 | 'fields' => null, |
||
433 | 'inputFields' => null, |
||
434 | 'interfaces' => null, |
||
435 | 'enumValues' => |
||
436 | [ |
||
437 | 0 => |
||
438 | [ |
||
439 | 'name' => 'SCALAR', |
||
440 | 'isDeprecated' => false, |
||
441 | 'deprecationReason' => null, |
||
442 | ], |
||
443 | 1 => |
||
444 | [ |
||
445 | 'name' => 'OBJECT', |
||
446 | 'isDeprecated' => false, |
||
447 | 'deprecationReason' => null, |
||
448 | ], |
||
449 | 2 => |
||
450 | [ |
||
451 | 'name' => 'INTERFACE', |
||
452 | 'isDeprecated' => false, |
||
453 | 'deprecationReason' => null, |
||
454 | ], |
||
455 | 3 => |
||
456 | [ |
||
457 | 'name' => 'UNION', |
||
458 | 'isDeprecated' => false, |
||
459 | 'deprecationReason' => null, |
||
460 | ], |
||
461 | 4 => |
||
462 | [ |
||
463 | 'name' => 'ENUM', |
||
464 | 'isDeprecated' => false, |
||
465 | 'deprecationReason' => null, |
||
466 | ], |
||
467 | 5 => |
||
468 | [ |
||
469 | 'name' => 'INPUT_OBJECT', |
||
470 | 'isDeprecated' => false, |
||
471 | 'deprecationReason' => null, |
||
472 | ], |
||
473 | 6 => |
||
474 | [ |
||
475 | 'name' => 'LIST', |
||
476 | 'isDeprecated' => false, |
||
477 | 'deprecationReason' => null, |
||
478 | ], |
||
479 | 7 => |
||
480 | [ |
||
481 | 'name' => 'NON_NULL', |
||
482 | 'isDeprecated' => false, |
||
483 | 'deprecationReason' => null, |
||
484 | ], |
||
485 | ], |
||
486 | 'possibleTypes' => null, |
||
487 | ], |
||
488 | [ |
||
489 | 'kind' => 'OBJECT', |
||
490 | 'name' => '__Field', |
||
491 | 'fields' => |
||
492 | [ |
||
493 | 0 => |
||
494 | [ |
||
495 | 'name' => 'name', |
||
496 | 'args' => |
||
497 | [], |
||
498 | 'type' => |
||
499 | [ |
||
500 | 'kind' => 'NON_NULL', |
||
501 | 'name' => null, |
||
502 | 'ofType' => |
||
503 | [ |
||
504 | 'kind' => 'SCALAR', |
||
505 | 'name' => 'String', |
||
506 | ], |
||
507 | ], |
||
508 | 'isDeprecated' => false, |
||
509 | 'deprecationReason' => null, |
||
510 | ], |
||
511 | 1 => |
||
512 | [ |
||
513 | 'name' => 'description', |
||
514 | 'args' => |
||
515 | [], |
||
516 | 'type' => |
||
517 | [ |
||
518 | 'kind' => 'SCALAR', |
||
519 | 'name' => 'String', |
||
520 | ], |
||
521 | 'isDeprecated' => false, |
||
522 | 'deprecationReason' => null, |
||
523 | ], |
||
524 | 2 => |
||
525 | [ |
||
526 | 'name' => 'args', |
||
527 | 'args' => |
||
528 | [], |
||
529 | 'type' => |
||
530 | [ |
||
531 | 'kind' => 'NON_NULL', |
||
532 | 'name' => null, |
||
533 | 'ofType' => |
||
534 | [ |
||
535 | 'kind' => 'LIST', |
||
536 | 'name' => null, |
||
537 | 'ofType' => |
||
538 | [ |
||
539 | 'kind' => 'NON_NULL', |
||
540 | 'name' => null, |
||
541 | 'ofType' => |
||
542 | [ |
||
543 | 'kind' => 'OBJECT', |
||
544 | 'name' => '__InputValue', |
||
545 | ], |
||
546 | ], |
||
547 | ], |
||
548 | ], |
||
549 | 'isDeprecated' => false, |
||
550 | 'deprecationReason' => null, |
||
551 | ], |
||
552 | 3 => |
||
553 | [ |
||
554 | 'name' => 'type', |
||
555 | 'args' => |
||
556 | [], |
||
557 | 'type' => |
||
558 | [ |
||
559 | 'kind' => 'NON_NULL', |
||
560 | 'name' => null, |
||
561 | 'ofType' => |
||
562 | [ |
||
563 | 'kind' => 'OBJECT', |
||
564 | 'name' => '__Type', |
||
565 | ], |
||
566 | ], |
||
567 | 'isDeprecated' => false, |
||
568 | 'deprecationReason' => null, |
||
569 | ], |
||
570 | 4 => |
||
571 | [ |
||
572 | 'name' => 'isDeprecated', |
||
573 | 'args' => |
||
574 | [], |
||
575 | 'type' => |
||
576 | [ |
||
577 | 'kind' => 'NON_NULL', |
||
578 | 'name' => null, |
||
579 | 'ofType' => |
||
580 | [ |
||
581 | 'kind' => 'SCALAR', |
||
582 | 'name' => 'Boolean', |
||
583 | ], |
||
584 | ], |
||
585 | 'isDeprecated' => false, |
||
586 | 'deprecationReason' => null, |
||
587 | ], |
||
588 | 5 => |
||
589 | [ |
||
590 | 'name' => 'deprecationReason', |
||
591 | 'args' => |
||
592 | [], |
||
593 | 'type' => |
||
594 | [ |
||
595 | 'kind' => 'SCALAR', |
||
596 | 'name' => 'String', |
||
597 | ], |
||
598 | 'isDeprecated' => false, |
||
599 | 'deprecationReason' => null, |
||
600 | ], |
||
601 | ], |
||
602 | 'inputFields' => null, |
||
603 | 'interfaces' => |
||
604 | [], |
||
605 | 'enumValues' => null, |
||
606 | 'possibleTypes' => null, |
||
607 | ], |
||
608 | [ |
||
609 | 'kind' => 'OBJECT', |
||
610 | 'name' => '__InputValue', |
||
611 | 'fields' => |
||
612 | [ |
||
613 | 0 => |
||
614 | [ |
||
615 | 'name' => 'name', |
||
616 | 'args' => |
||
617 | [], |
||
618 | 'type' => |
||
619 | [ |
||
620 | 'kind' => 'NON_NULL', |
||
621 | 'name' => null, |
||
622 | 'ofType' => |
||
623 | [ |
||
624 | 'kind' => 'SCALAR', |
||
625 | 'name' => 'String', |
||
626 | ], |
||
627 | ], |
||
628 | 'isDeprecated' => false, |
||
629 | 'deprecationReason' => null, |
||
630 | ], |
||
631 | 1 => |
||
632 | [ |
||
633 | 'name' => 'description', |
||
634 | 'args' => |
||
635 | [], |
||
636 | 'type' => |
||
637 | [ |
||
638 | 'kind' => 'SCALAR', |
||
639 | 'name' => 'String', |
||
640 | ], |
||
641 | 'isDeprecated' => false, |
||
642 | 'deprecationReason' => null, |
||
643 | ], |
||
644 | 2 => |
||
645 | [ |
||
646 | 'name' => 'type', |
||
647 | 'args' => |
||
648 | [], |
||
649 | 'type' => |
||
650 | [ |
||
651 | 'kind' => 'NON_NULL', |
||
652 | 'name' => null, |
||
653 | 'ofType' => |
||
654 | [ |
||
655 | 'kind' => 'OBJECT', |
||
656 | 'name' => '__Type', |
||
657 | ], |
||
658 | ], |
||
659 | 'isDeprecated' => false, |
||
660 | 'deprecationReason' => null, |
||
661 | ], |
||
662 | 3 => |
||
663 | [ |
||
664 | 'name' => 'defaultValue', |
||
665 | 'args' => |
||
666 | [], |
||
667 | 'type' => |
||
668 | [ |
||
669 | 'kind' => 'SCALAR', |
||
670 | 'name' => 'String', |
||
671 | ], |
||
672 | 'isDeprecated' => false, |
||
673 | 'deprecationReason' => null, |
||
674 | ], |
||
675 | ], |
||
676 | 'inputFields' => null, |
||
677 | 'interfaces' => |
||
678 | [], |
||
679 | 'enumValues' => null, |
||
680 | 'possibleTypes' => null, |
||
681 | ], |
||
682 | [ |
||
683 | 'kind' => 'OBJECT', |
||
684 | 'name' => '__EnumValue', |
||
685 | 'fields' => |
||
686 | [ |
||
687 | 0 => |
||
688 | [ |
||
689 | 'name' => 'name', |
||
690 | 'args' => |
||
691 | [], |
||
692 | 'type' => |
||
693 | [ |
||
694 | 'kind' => 'NON_NULL', |
||
695 | 'name' => null, |
||
696 | 'ofType' => |
||
697 | [ |
||
698 | 'kind' => 'SCALAR', |
||
699 | 'name' => 'String', |
||
700 | ], |
||
701 | ], |
||
702 | 'isDeprecated' => false, |
||
703 | 'deprecationReason' => null, |
||
704 | ], |
||
705 | 1 => |
||
706 | [ |
||
707 | 'name' => 'description', |
||
708 | 'args' => |
||
709 | [], |
||
710 | 'type' => |
||
711 | [ |
||
712 | 'kind' => 'SCALAR', |
||
713 | 'name' => 'String', |
||
714 | ], |
||
715 | 'isDeprecated' => false, |
||
716 | 'deprecationReason' => null, |
||
717 | ], |
||
718 | 2 => |
||
719 | [ |
||
720 | 'name' => 'isDeprecated', |
||
721 | 'args' => |
||
722 | [], |
||
723 | 'type' => |
||
724 | [ |
||
725 | 'kind' => 'NON_NULL', |
||
726 | 'name' => null, |
||
727 | 'ofType' => |
||
728 | [ |
||
729 | 'kind' => 'SCALAR', |
||
730 | 'name' => 'Boolean', |
||
731 | ], |
||
732 | ], |
||
733 | 'isDeprecated' => false, |
||
734 | 'deprecationReason' => null, |
||
735 | ], |
||
736 | 3 => |
||
737 | [ |
||
738 | 'name' => 'deprecationReason', |
||
739 | 'args' => |
||
740 | [], |
||
741 | 'type' => |
||
742 | [ |
||
743 | 'kind' => 'SCALAR', |
||
744 | 'name' => 'String', |
||
745 | ], |
||
746 | 'isDeprecated' => false, |
||
747 | 'deprecationReason' => null, |
||
748 | ], |
||
749 | ], |
||
750 | 'inputFields' => null, |
||
751 | 'interfaces' => |
||
752 | [], |
||
753 | 'enumValues' => null, |
||
754 | 'possibleTypes' => null, |
||
755 | ], |
||
756 | [ |
||
757 | 'kind' => 'OBJECT', |
||
758 | 'name' => '__Directive', |
||
759 | 'fields' => |
||
760 | [ |
||
761 | 0 => |
||
762 | [ |
||
763 | 'name' => 'name', |
||
764 | 'args' => |
||
765 | [], |
||
766 | 'type' => |
||
767 | [ |
||
768 | 'kind' => 'NON_NULL', |
||
769 | 'name' => null, |
||
770 | 'ofType' => |
||
771 | [ |
||
772 | 'kind' => 'SCALAR', |
||
773 | 'name' => 'String', |
||
774 | ], |
||
775 | ], |
||
776 | 'isDeprecated' => false, |
||
777 | 'deprecationReason' => null, |
||
778 | ], |
||
779 | 1 => |
||
780 | [ |
||
781 | 'name' => 'description', |
||
782 | 'args' => |
||
783 | [], |
||
784 | 'type' => |
||
785 | [ |
||
786 | 'kind' => 'SCALAR', |
||
787 | 'name' => 'String', |
||
788 | ], |
||
789 | 'isDeprecated' => false, |
||
790 | 'deprecationReason' => null, |
||
791 | ], |
||
792 | 2 => |
||
793 | [ |
||
794 | 'name' => 'locations', |
||
795 | 'args' => |
||
796 | [], |
||
797 | 'type' => |
||
798 | [ |
||
799 | 'kind' => 'NON_NULL', |
||
800 | 'name' => null, |
||
801 | 'ofType' => |
||
802 | [ |
||
803 | 'kind' => 'LIST', |
||
804 | 'name' => null, |
||
805 | 'ofType' => |
||
806 | [ |
||
807 | 'kind' => 'NON_NULL', |
||
808 | 'name' => null, |
||
809 | 'ofType' => |
||
810 | [ |
||
811 | 'kind' => 'ENUM', |
||
812 | 'name' => '__DirectiveLocation', |
||
813 | ], |
||
814 | ], |
||
815 | ], |
||
816 | ], |
||
817 | 'isDeprecated' => false, |
||
818 | 'deprecationReason' => null, |
||
819 | ], |
||
820 | 3 => |
||
821 | [ |
||
822 | 'name' => 'args', |
||
823 | 'args' => |
||
824 | [], |
||
825 | 'type' => |
||
826 | [ |
||
827 | 'kind' => 'NON_NULL', |
||
828 | 'name' => null, |
||
829 | 'ofType' => |
||
830 | [ |
||
831 | 'kind' => 'LIST', |
||
832 | 'name' => null, |
||
833 | 'ofType' => |
||
834 | [ |
||
835 | 'kind' => 'NON_NULL', |
||
836 | 'name' => null, |
||
837 | 'ofType' => |
||
838 | [ |
||
839 | 'kind' => 'OBJECT', |
||
840 | 'name' => '__InputValue', |
||
841 | ], |
||
842 | ], |
||
843 | ], |
||
844 | ], |
||
845 | 'isDeprecated' => false, |
||
846 | 'deprecationReason' => null, |
||
847 | ], |
||
848 | 4 => |
||
849 | [ |
||
850 | 'name' => 'onOperation', |
||
851 | 'args' => |
||
852 | [], |
||
853 | 'type' => |
||
854 | [ |
||
855 | 'kind' => 'NON_NULL', |
||
856 | 'name' => null, |
||
857 | 'ofType' => |
||
858 | [ |
||
859 | 'kind' => 'SCALAR', |
||
860 | 'name' => 'Boolean', |
||
861 | ], |
||
862 | ], |
||
863 | 'isDeprecated' => true, |
||
864 | 'deprecationReason' => 'Use `locations`.', |
||
865 | ], |
||
866 | 5 => |
||
867 | [ |
||
868 | 'name' => 'onFragment', |
||
869 | 'args' => |
||
870 | [], |
||
871 | 'type' => |
||
872 | [ |
||
873 | 'kind' => 'NON_NULL', |
||
874 | 'name' => null, |
||
875 | 'ofType' => |
||
876 | [ |
||
877 | 'kind' => 'SCALAR', |
||
878 | 'name' => 'Boolean', |
||
879 | ], |
||
880 | ], |
||
881 | 'isDeprecated' => true, |
||
882 | 'deprecationReason' => 'Use `locations`.', |
||
883 | ], |
||
884 | 6 => |
||
885 | [ |
||
886 | 'name' => 'onField', |
||
887 | 'args' => |
||
888 | [], |
||
889 | 'type' => |
||
890 | [ |
||
891 | 'kind' => 'NON_NULL', |
||
892 | 'name' => null, |
||
893 | 'ofType' => |
||
894 | [ |
||
895 | 'kind' => 'SCALAR', |
||
896 | 'name' => 'Boolean', |
||
897 | |||
898 | ], |
||
899 | ], |
||
900 | 'isDeprecated' => true, |
||
901 | 'deprecationReason' => 'Use `locations`.', |
||
902 | ], |
||
903 | ], |
||
904 | 'inputFields' => null, |
||
905 | 'interfaces' => |
||
906 | [], |
||
907 | 'enumValues' => null, |
||
908 | 'possibleTypes' => null, |
||
909 | ], |
||
910 | [ |
||
911 | 'kind' => 'ENUM', |
||
912 | 'name' => '__DirectiveLocation', |
||
913 | 'fields' => null, |
||
914 | 'inputFields' => null, |
||
915 | 'interfaces' => null, |
||
916 | 'enumValues' => |
||
917 | [ |
||
918 | 0 => |
||
919 | [ |
||
920 | 'name' => 'QUERY', |
||
921 | 'isDeprecated' => false, |
||
922 | 'deprecationReason' => null, |
||
923 | ], |
||
924 | 1 => |
||
925 | [ |
||
926 | 'name' => 'MUTATION', |
||
927 | 'isDeprecated' => false, |
||
928 | 'deprecationReason' => null, |
||
929 | ], |
||
930 | 2 => |
||
931 | [ |
||
932 | 'name' => 'SUBSCRIPTION', |
||
933 | 'isDeprecated' => false, |
||
934 | 'deprecationReason' => null, |
||
935 | ], |
||
936 | 3 => |
||
937 | [ |
||
938 | 'name' => 'FIELD', |
||
939 | 'isDeprecated' => false, |
||
940 | 'deprecationReason' => null, |
||
941 | ], |
||
942 | 4 => |
||
943 | [ |
||
944 | 'name' => 'FRAGMENT_DEFINITION', |
||
945 | 'isDeprecated' => false, |
||
946 | 'deprecationReason' => null, |
||
947 | ], |
||
948 | 5 => |
||
949 | [ |
||
950 | 'name' => 'FRAGMENT_SPREAD', |
||
951 | 'isDeprecated' => false, |
||
952 | 'deprecationReason' => null, |
||
953 | ], |
||
954 | 6 => |
||
955 | [ |
||
956 | 'name' => 'INLINE_FRAGMENT', |
||
957 | 'isDeprecated' => false, |
||
958 | 'deprecationReason' => null, |
||
959 | ], |
||
960 | ], |
||
961 | 'possibleTypes' => null, |
||
962 | ], |
||
963 | ], |
||
964 | 'directives' => |
||
965 | [ |
||
966 | 0 => |
||
967 | [ |
||
968 | 'name' => 'include', |
||
969 | 'locations' => |
||
970 | [ |
||
971 | 0 => 'FIELD', |
||
972 | 1 => 'FRAGMENT_SPREAD', |
||
973 | 2 => 'INLINE_FRAGMENT', |
||
974 | ], |
||
975 | 'args' => |
||
976 | [ |
||
977 | 0 => |
||
978 | [ |
||
979 | 'defaultValue' => null, |
||
980 | 'name' => 'if', |
||
981 | 'type' => |
||
982 | [ |
||
983 | 'kind' => 'NON_NULL', |
||
984 | 'name' => null, |
||
985 | 'ofType' => |
||
986 | [ |
||
987 | 'kind' => 'SCALAR', |
||
988 | 'name' => 'Boolean', |
||
989 | ], |
||
990 | ], |
||
991 | ], |
||
992 | ], |
||
993 | ], |
||
994 | 1 => |
||
995 | [ |
||
996 | 'name' => 'skip', |
||
997 | 'locations' => |
||
998 | [ |
||
999 | 0 => 'FIELD', |
||
1000 | 1 => 'FRAGMENT_SPREAD', |
||
1001 | 2 => 'INLINE_FRAGMENT', |
||
1002 | ], |
||
1003 | 'args' => |
||
1004 | [ |
||
1005 | 0 => |
||
1006 | [ |
||
1007 | 'defaultValue' => null, |
||
1008 | 'name' => 'if', |
||
1009 | 'type' => |
||
1010 | [ |
||
1011 | 'kind' => 'NON_NULL', |
||
1012 | 'name' => null, |
||
1013 | 'ofType' => |
||
1014 | [ |
||
1015 | 'kind' => 'SCALAR', |
||
1016 | 'name' => 'Boolean', |
||
1017 | ], |
||
1018 | ], |
||
1019 | ], |
||
1020 | ], |
||
1021 | ], |
||
1022 | ], |
||
1023 | ], |
||
1024 | ], |
||
1025 | ]; |
||
1026 | |||
1027 | $actual = GraphQL::executeQuery($emptySchema, $request)->toArray(); |
||
1028 | |||
1029 | // self::assertEquals($expected, $actual); |
||
1030 | self::assertArraySubset($expected, $actual); |
||
|
|||
1031 | } |
||
1593 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.