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
18:31
created

setFullNameEmbeddable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
eloc 2
nc 1
nop 1
crap 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
    private $fullNameEmbeddable;
13
14 2
    private function initFullName()
15
    {
16 2
        $this->fullNameEmbeddable = new FullNameEmbeddable();
17 2
    }
18
19
20
    /**
21
     * @return mixed
22
     */
23 2
    public function getFullNameEmbeddable(): FullNameEmbeddableInterface
24
    {
25 2
        return $this->fullNameEmbeddable;
26
    }
27
28
    /**
29
     * @param mixed $fullNameEmbeddable
30
     *
31
     * @return HasFullNameEmbeddableInterface
32
     */
33 1
    public function setFullNameEmbeddable($fullNameEmbeddable): HasFullNameEmbeddableInterface
34
    {
35 1
        $this->fullNameEmbeddable = $fullNameEmbeddable;
36
37 1
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type EdmondsCommerce\Doctrine...FullNameEmbeddableTrait which is incompatible with the type-hinted return EdmondsCommerce\Doctrine...NameEmbeddableInterface.
Loading history...
38
    }
39
40
    /**
41
     * @param ClassMetadataBuilder $builder
42
     */
43 1
    protected static function metaForFullNameEmbeddable(ClassMetadataBuilder $builder): void
44
    {
45 1
        $builder->createEmbedded(HasFullNameEmbeddableInterface::PROP_FULL_NAME, FullNameEmbeddable::class)
46 1
                ->setColumnPrefix(HasFullNameEmbeddableInterface::COLUMN_PREFIX_FULL_NAME)
47 1
                ->build();
48 1
    }
49
}
50