Completed
Push — master ( 5acd05...f1dd04 )
by Beñat
02:15 queued 34s
created

GetFilesRoutesLoaderBuilder   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 1
dl 0
loc 37
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A definitionName() 0 4 1
A defaultUploadDir() 0 4 1
A defaultRouteName() 0 4 1
A defaultRoutePath() 0 4 1
A definitionApiName() 0 4 1
A defaultApiRouteName() 0 4 1
A defaultApiRoutePath() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the BenGorFile package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorFile\FileBundle\DependencyInjection\Compiler\Routing;
14
15
/**
16
 * @author Beñat Espiña <[email protected]>
17
 */
18
class GetFilesRoutesLoaderBuilder extends RoutesLoaderBuilder
19
{
20
    protected function definitionName()
21
    {
22
        return 'bengor.file_bundle.routing.get_files_routes_loader';
23
    }
24
25
    protected function defaultUploadDir($file)
26
    {
27
        return sprintf('/%ss', $file);
28
    }
29
30
    protected function defaultRouteName($file)
31
    {
32
        return sprintf('bengor_file_%s_get_files', $file);
33
    }
34
35
    protected function defaultRoutePath($file)
36
    {
37
        return sprintf('/%ss', $file);
38
    }
39
40
    protected function definitionApiName()
41
    {
42
        return 'bengor.file_bundle.routing.api_get_files_routes_loader';
43
    }
44
45
    protected function defaultApiRouteName($file)
46
    {
47
        return sprintf('bengor_file_%s_api_get_files', $file);
48
    }
49
50
    protected function defaultApiRoutePath($file)
51
    {
52
        return sprintf('/api/%ss', $file);
53
    }
54
}
55