Code Duplication    Length = 9-10 lines in 2 locations

code/GraphQL/ReadFileQueryCreator.php 1 location

@@ 33-41 (lines=9) @@
30
                        $this->manager->getType('File'),
31
                        $this->manager->getType('Folder')
32
                    ],
33
                    'resolveType' => function ($object) {
34
                        if ($object instanceof Folder) {
35
                            return $this->manager->getType('Folder');
36
                        }
37
                        if ($object instanceof File) {
38
                            return $this->manager->getType('File');
39
                        }
40
                        return null;
41
                    }
42
                ]);
43
                return $unionType;
44
            })

code/GraphQL/FileInterfaceTypeCreator.php 1 location

@@ 72-81 (lines=10) @@
69
        ];
70
    }
71
72
    public function resolveType($object)
73
    {
74
        if ($object instanceof Folder) {
75
            return $this->manager->getType('Folder');
76
        }
77
        if ($object instanceof File) {
78
            return $this->manager->getType('File');
79
        }
80
        return null;
81
    }
82
}
83