Code Duplication    Length = 18-18 lines in 2 locations

src/BenGorFile/FileBundle/Routing/Api/GetFilesRoutesLoader.php 1 location

@@ 28-45 (lines=18) @@
25
        return 'bengor_file_get_files_api' === $type;
26
    }
27
28
    protected function register($file, array $config)
29
    {
30
        $this->routes->add(
31
            $config['api_name'],
32
            new Route(
33
                $config['api_path'],
34
                [
35
                    '_controller' => 'BenGorFileBundle:Api\GetFiles:byIds',
36
                    'fileClass'   => $file,
37
                ],
38
                [],
39
                [],
40
                '',
41
                [],
42
                ['GET']
43
            )
44
        );
45
    }
46
}
47

src/BenGorFile/FileBundle/Routing/Api/UploadRoutesLoader.php 1 location

@@ 28-45 (lines=18) @@
25
        return 'bengor_file_upload_api' === $type;
26
    }
27
28
    protected function register($file, array $config)
29
    {
30
        $this->routes->add(
31
            $config['api_name'],
32
            new Route(
33
                $config['api_path'],
34
                [
35
                    '_controller' => $this->action($config),
36
                    'fileClass'   => $file,
37
                ],
38
                [],
39
                [],
40
                '',
41
                [],
42
                ['GET']
43
            )
44
        );
45
    }
46
47
    private function action(array $config)
48
    {