DtoWithRelationToEntityTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntityId() 0 4 1
A setEntityId() 0 6 1
1
<?php
2
/*
3
 * This file is part of the StfalconApiBundle.
4
 *
5
 * (c) Stfalcon LLC <stfalcon.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace StfalconStudio\ApiBundle\DTO;
14
15
/**
16
 * DtoWithRelationToEntityTrait.
17
 */
18
trait DtoWithRelationToEntityTrait
19
{
20
    /** @var string */
21
    private $entityId;
22
23
    /**
24
     * @return string|null
25
     */
26
    public function getEntityId(): ?string
27
    {
28
        return $this->entityId;
29
    }
30
31
    /**
32
     * @param string $entityId
33
     *
34
     * @return self
35
     */
36
    public function setEntityId(string $entityId): self
37
    {
38
        $this->entityId = \trim($entityId);
39
40
        return $this;
41
    }
42
}
43