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

MultitenantEndpointBuilderTrait::buildTenants()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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