IdentityUuid   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setIdentityUuid() 0 3 1
A getIdentityUuid() 0 5 1
1
<?php
2
3
namespace App\Entity\Attribute\Accessor\Persona;
4
5
use LogicException;
6
7
/**
8
 * Trait IdentityUuid
9
 */
10
trait IdentityUuid
11
{
12
    /**
13
     * Set identity uuid
14
     *
15
     * @param string $identityUuid
16
     * @return object
17
     * @throws \LogicException
18
     */
19
    public function setIdentityUuid(?string $identityUuid)
20
    {
21
        throw new LogicException('Method call not allowed.');
22
    }
23
24
    /**
25
     * Get identity uuid
26
     *
27
     * @return string
28
     */
29
    public function getIdentityUuid(): ?string
30
    {
31
        $identity = substr(basename(str_replace('\\', '/', get_class($this))), 0, -7);
32
33
        return $this->{'get'.$identity}()->getIdentityUuid();
34
    }
35
}
36