GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#58)
by joseph
28:39
created

HasFullNameEmbeddableTrait   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 43
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A metaForFullNameEmbeddable() 0 5 1
A setFullNameEmbeddable() 0 5 1
A initFullName() 0 3 1
A getFullNameEmbeddable() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Identity;
4
5
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
6
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Identity\HasFullNameEmbeddableInterface;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Objects\Identity\FullNameEmbeddableInterface;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Identity\FullNameEmbeddable;
9
10
trait HasFullNameEmbeddableTrait
11
{
12
    /**
13
     * @var FullNameEmbeddable
14
     */
15
    private $fullNameEmbeddable;
16
17
    /**
18
     * Called at construction time
19
     */
20 2
    private function initFullName()
21
    {
22 2
        $this->fullNameEmbeddable = new FullNameEmbeddable();
23 2
    }
24
25
    /**
26
     * @return mixed
27
     */
28 2
    public function getFullNameEmbeddable(): FullNameEmbeddableInterface
29
    {
30 2
        return $this->fullNameEmbeddable;
31
    }
32
33
    /**
34
     * @param mixed $fullNameEmbeddable
35
     *
36
     * @return $this
37
     */
38 1
    public function setFullNameEmbeddable($fullNameEmbeddable): self
39
    {
40 1
        $this->fullNameEmbeddable = $fullNameEmbeddable;
41
42 1
        return $this;
43
    }
44
45
    /**
46
     * @param ClassMetadataBuilder $builder
47
     */
48 1
    protected static function metaForFullNameEmbeddable(ClassMetadataBuilder $builder): void
49
    {
50 1
        $builder->createEmbedded(HasFullNameEmbeddableInterface::PROP_FULL_NAME, FullNameEmbeddable::class)
51 1
                ->setColumnPrefix(HasFullNameEmbeddableInterface::COLUMN_PREFIX_FULL_NAME)
52 1
                ->build();
53 1
    }
54
}
55