Code Duplication    Length = 13-13 lines in 2 locations

Tests/Parser/ParserTest.php 1 location

@@ 28-40 (lines=13) @@
25
class ParserTest extends \PHPUnit_Framework_TestCase
26
{
27
28
    public function testEmptyParser()
29
    {
30
        $parser = new Parser();
31
32
        $this->assertEquals([
33
            'queries'            => [],
34
            'mutations'          => [],
35
            'fragments'          => [],
36
            'fragmentReferences' => [],
37
            'variables'          => [],
38
            'variableReferences' => [],
39
        ], $parser->parse());
40
    }
41
42
    /**
43
     * @expectedException Youshido\GraphQL\Exception\Parser\SyntaxErrorException

src/Parser/Parser.php 1 location

@@ 75-87 (lines=13) @@
72
        return $this->data;
73
    }
74
75
    private function init($source = null)
76
    {
77
        $this->initTokenizer($source);
78
79
        $this->data = [
80
            'queries'            => [],
81
            'mutations'          => [],
82
            'fragments'          => [],
83
            'fragmentReferences' => [],
84
            'variables'          => [],
85
            'variableReferences' => [],
86
        ];
87
    }
88
89
    protected function parseOperation($type = Token::TYPE_QUERY)
90
    {