Completed
Push — master ( 32f082...893399 )
by Dmitry
12:23
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
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
    protected int $tenantMask;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
16
17
    /** {@inheritDoc} */
18
    public function exportTo(int $tenantMask)
19
    {
20
        $this->tenantMask = $tenantMask;
21
22
        return $this;
23
    }
24
25
    protected function buildTenants(EndpointConfigurationInterface $configuration): void
26
    {
27
        $configuration->set('tenantMask', $this->tenantMask);
28
    }
29
}
30