TenantTrait::setTenant()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Tahoe\Bundle\MultiTenancyBundle\Model;
4
5
/**
6
 * Trait TenantTrait
7
 *
8
 * @author Konrad Podgórski <[email protected]>
9
 */
10
trait TenantTrait
11
{
12
    /**
13
     * @var MultiTenantTenantInterface
14
     */
15
    protected $tenant;
16
17
    /**
18
     * @return MultiTenantTenantInterface
19
     */
20
    public function getTenant()
21
    {
22
        return $this->tenant;
23
    }
24
25
    /**
26
     * @param MultiTenantTenantInterface $tenant
27
     *
28
     * @return $this
29
     */
30
    public function setTenant($tenant)
31
    {
32
        $this->tenant = $tenant;
33
34
        return $this;
35
    }
36
}
37