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.
Passed
Pull Request — master (#58)
by joseph
17:08
created

HasAddressEmbeddableTrait::initAddress()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 1
nc 1
nop 0
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 2
    private function initAddress()
20
    {
21 2
        $this->addressEmbeddable = new AddressEmbeddable();
22 2
    }
23
24
    /**
25
     * @return AddressEmbeddableInterface
26
     */
27 2
    public function getAddressEmbeddable(): AddressEmbeddableInterface
28
    {
29 2
        return $this->addressEmbeddable;
30
    }
31
32
    /**
33
     * @param AddressEmbeddableInterface $address
34
     *
35
     * @return HasAddressEmbeddableInterface
36
     */
37 1
    public function setAddressEmbeddable(AddressEmbeddableInterface $address): HasAddressEmbeddableInterface
38
    {
39 1
        $this->addressEmbeddable = $address;
40
41 1
        return $this;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this returns the type EdmondsCommerce\Doctrine...sAddressEmbeddableTrait which is incompatible with the type-hinted return EdmondsCommerce\Doctrine...ressEmbeddableInterface.
Loading history...
42
    }
43
44
    /**
45
     * @param ClassMetadataBuilder $builder
46
     */
47 1
    protected static function metaForAddress(ClassMetadataBuilder $builder): void
48
    {
49 1
        $builder->createEmbedded(HasAddressEmbeddableInterface::PROP_ADDRESS, AddressEmbeddable::class)
50 1
                ->setColumnPrefix(HasAddressEmbeddableInterface::COLUMN_PREFIX_ADDRESS)
51 1
                ->build();
52 1
    }
53
}
54