GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( e7bef7...3cccd4 )
by Šimon
03:07
created

StarWarsBench::benchSchema()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
namespace GraphQL\Benchmarks;
3
4
use GraphQL\GraphQL;
5
use GraphQL\Tests\StarWarsSchema;
6
use GraphQL\Type\Introspection;
7
8
/**
9
 * @BeforeMethods({"setIntroQuery"})
10
 * @OutputTimeUnit("milliseconds", precision=3)
11
 * @Warmup(2)
12
 * @Revs(10)
13
 * @Iterations(2)
14
 */
15
class StarWarsBench
16
{
17
    private $introQuery;
18
19
    public function setIntroQuery()
20
    {
21
        $this->introQuery = Introspection::getIntrospectionQuery();
22
    }
23
24
    public function benchSchema()
25
    {
26
        StarWarsSchema::build();
27
    }
28
29
    public function benchHeroQuery()
30
    {
31
        $q = '
32
        query HeroNameQuery {
33
          hero {
34
            name
35
          }
36
        }
37
        ';
38
39
        GraphQL::executeQuery(
40
            StarWarsSchema::build(),
41
            $q
42
        );
43
    }
44
45
    public function benchNestedQuery()
46
    {
47
        $q = '
48
        query NestedQuery {
49
          hero {
50
            name
51
            friends {
52
              name
53
              appearsIn
54
              friends {
55
                name
56
              }
57
            }
58
          }
59
        }
60
        ';
61
        GraphQL::executeQuery(
62
            StarWarsSchema::build(),
63
            $q
64
        );
65
    }
66
67
    public function benchQueryWithFragment()
68
    {
69
        $q = '
70
        query UseFragment {
71
          luke: human(id: "1000") {
72
            ...HumanFragment
73
          }
74
          leia: human(id: "1003") {
75
            ...HumanFragment
76
          }
77
        }
78
79
        fragment HumanFragment on Human {
80
          name
81
          homePlanet
82
        }
83
        ';
84
85
        GraphQL::executeQuery(
86
            StarWarsSchema::build(),
87
            $q
88
        );
89
    }
90
91
    public function benchStarWarsIntrospectionQuery()
92
    {
93
        GraphQL::executeQuery(
94
            StarWarsSchema::build(),
95
            $this->introQuery
96
        );
97
    }
98
}
99