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

HasAddressEmbeddableTrait::metaForAddress()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
ccs 4
cts 4
cp 1
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
4
namespace EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Traits\Geo;
5
6
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
7
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Geo\HasAddressEmbeddableInterface;
8
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Interfaces\Objects\Geo\AddressEmbeddableInterface;
9
use EdmondsCommerce\DoctrineStaticMeta\Entity\Embeddable\Objects\Geo\AddressEmbeddable;
10
11
trait HasAddressEmbeddableTrait
12
{
13
    /**
14
     * @var AddressEmbeddableInterface
15
     */
16
    private $addressEmbeddable;
17
18
    /**
19
     * Called at construction time
20
     */
21 2
    private function initAddress()
22
    {
23 2
        $this->addressEmbeddable = new AddressEmbeddable();
24 2
    }
25
26
    /**
27
     * @return AddressEmbeddableInterface
28
     */
29 2
    public function getAddressEmbeddable(): AddressEmbeddableInterface
30
    {
31 2
        return $this->addressEmbeddable;
32
    }
33
34
    /**
35
     * @param AddressEmbeddableInterface $address
36
     *
37
     * @return $this
38
     */
39 1
    public function setAddressEmbeddable(AddressEmbeddableInterface $address): self
40
    {
41 1
        $this->addressEmbeddable = $address;
42
43 1
        return $this;
44
    }
45
46
    /**
47
     * @param ClassMetadataBuilder $builder
48
     */
49 1
    protected static function metaForAddress(ClassMetadataBuilder $builder): void
50
    {
51 1
        $builder->createEmbedded(HasAddressEmbeddableInterface::PROP_ADDRESS, AddressEmbeddable::class)
52 1
                ->setColumnPrefix(HasAddressEmbeddableInterface::COLUMN_PREFIX_ADDRESS)
53 1
                ->build();
54 1
    }
55
}
56