Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Push — master ( 1dd833...8b26b2 )
by Jérémiah
16:34
created

ParserBench   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A benchParse() 0 4 1
A requestProvider() 0 6 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\Benchmarks\Request;
4
5
use Overblog\GraphQLBundle\Benchmarks\Benchmark;
6
use Overblog\GraphQLBundle\Request\Parser;
7
use Symfony\Component\HttpFoundation\Request;
8
9
/**
10
 * @Warmup(2)
11
 * @Revs(100)
12
 */
13
final class ParserBench extends Benchmark
14
{
15
    /** @var Parser */
16
    private $parser;
17
18
    public function setUp()
19
    {
20
        $this->parser = new Parser();
21
    }
22
23
    /**
24
     * @ParamProviders({"requestProvider"})
25
     *
26
     * @param array $args
27
     */
28
    public function benchParse(array $args)
29
    {
30
        $this->parser->parse(new Request(...$args));
31
    }
32
33
    public function requestProvider()
34
    {
35
        yield [['query' => '{ foo }']];
36
        yield [['query' => 'query bar { foo }', 'variables' => '{"baz": "bar"}', 'operationName' => 'bar']];
37
        yield [[], ['variables' => '{"baz": "bar"}', 'operationName' => 'bar'], [], [], [], ['CONTENT_TYPE' => 'application/graphql'], '{ foo }'];
38
    }
39
}
40