Passed
Pull Request — master (#221)
by
unknown
03:00
created

Bar::getFoo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Zenstruck\Foundry\Tests\Fixtures\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="bars")
10
 */
11
class Bar
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\GeneratedValue
16
     * @ORM\Column(type="integer")
17
     */
18
    private $id;
0 ignored issues
show
introduced by
The private property $id is not used, and could be removed.
Loading history...
19
20
    /**
21
     * @ORM\ManyToOne(targetEntity=Foo::class, inversedBy="oneToMany")
22
     */
23
    private $foo;
24
25
    public function getFoo(): ?Foo
26
    {
27
        return $this->foo;
28
    }
29
30
    public function setFoo(?Foo $foo): self
31
    {
32
        $this->foo = $foo;
33
34
        return $this;
35
    }
36
}
37