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

MultitenantEndpointBuilderTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A exportTo() 0 6 1
A buildTenants() 0 4 1
1
<?php
2
3
4
namespace hiapi\endpoints\Module\Multitenant;
5
6
use hiapi\endpoints\EndpointConfigurationInterface;
7
8
/**
9
 * Trait MultitenantEndpointBuilderTrait
10
 *
11
 * @author Dmytro Naumenko <[email protected]>
12
 */
13
trait MultitenantEndpointBuilderTrait
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $exportTo;
19
20
    /** {@inheritDoc} */
21
    public function exportTo(string $tenants)
22
    {
23
        $this->exportTo = $tenants;
24
25
        return $this;
26
    }
27
28
    protected function buildTenants(EndpointConfigurationInterface $configuration): void
29
    {
30
        $configuration->set('tenants', $this->exportTo);
31
    }
32
}
33