Passed
Pull Request — master (#9)
by Pavel
11:27
created

AttributesHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAttributes() 0 9 1
1
<?php
2
3
namespace Bankiru\Api\Rpc\Routing;
4
5
final class AttributesHelper
6
{
7
    /**
8
     * Return default attributes for route
9
     *
10
     * @param Route  $method
11
     * @param string $name
12
     *
13
     * @return array
14
     */
15 1
    public static function getAttributes(Route $method, $name)
16
    {
17
        return [
18 1
            '_route'                => $name,
19 1
            '_controller'           => $method->getController(),
20 1
            '_with_default_context' => $method->includeDefaultContext(),
21 1
            '_context'              => $method->getContext(),
22 1
        ];
23
    }
24
}
25