IdentityUuid::getIdentityUuid()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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