Completed
Push — master ( f7b321...a68cc8 )
by Pavel
04:26
created

CrudsRoute   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 21
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 18 1
1
<?php
2
3
namespace ScayTrase\Api\Cruds\Routing;
4
5
use Symfony\Component\Routing\Route;
6
7
class CrudsRoute extends Route
8
{
9 12
    public static function create($path, $controller, array $methods, array $options = [])
10
    {
11 12
        return new static(
12 12
            $path,
13
            [
14 12
                '_controller' => $controller,
15 12
            ],
16 12
            [],
17
            [
18 12
                'cruds_api' => true,
19
                'cruds_options' => $options
20 12
            ],
21 12
            '',
22 12
            [],
23 12
            $methods,
24
            ''
25 12
        );
26
    }
27
}
28