Completed
Push — master ( eb04a4...cf4b83 )
by Dmitry
11:42
created

NamedEndpointBuilderTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A name() 0 6 1
A buildName() 0 4 1
1
<?php
2
3
4
namespace hiapi\endpoints\Module\NamedEndpoint;
5
6
use hiapi\endpoints\EndpointConfigurationInterface;
7
8
trait NamedEndpointBuilderTrait
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $name;
14
15
    public function name(string $name)
16
    {
17
        $this->name = $name;
18
19
        return $this;
20
    }
21
22
    protected function buildName(EndpointConfigurationInterface $configuration)
23
    {
24
        $configuration->set('name', $this->name);
25
    }
26
}
27