Passed
Pull Request — master (#7648)
by Ahmed M.
09:27
created

DDC2372Address::setAddress()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Tests\Models\DDC2372\Traits;
6
7
use Doctrine\ORM\Annotation as ORM;
8
9
trait DDC2372Address
10
{
11
    /**
12
     * @ORM\OneToOne(targetEntity=DDC2372Address::class, inversedBy="user")
13
     * @ORM\JoinColumn(name="address_id", referencedColumnName="id")
14
     */
15
    private $address;
16
17
    public function getAddress()
18
    {
19
        return $this->address;
20
    }
21
22
    public function setAddress(Address $address)
0 ignored issues
show
Bug introduced by
The type Doctrine\Tests\Models\DDC2372\Traits\Address was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
23
    {
24
        if ($this->address !== $address) {
25
            $this->address = $address;
26
            $address->setUser($this);
27
        }
28
    }
29
}
30