Code Duplication    Length = 13-13 lines in 2 locations

src/Parser/Parser.php 1 location

@@ 68-80 (lines=13) @@
65
        return $this->data;
66
    }
67
68
    private function init($source = null)
69
    {
70
        $this->initTokenizer($source);
71
72
        $this->data = [
73
            'queries'            => [],
74
            'mutations'          => [],
75
            'fragments'          => [],
76
            'fragmentReferences' => [],
77
            'variables'          => [],
78
            'variableReferences' => []
79
        ];
80
    }
81
82
    protected function parseBody($token = Token::TYPE_QUERY, $highLevel = true)
83
    {

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