Passed
Push — master ( 0416dc...1faf97 )
by Kevin
03:44
created

Review   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 9
c 1
b 0
f 0
dl 0
loc 42
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setRank() 0 3 1
A getProduct() 0 3 1
A getRank() 0 3 1
A setProduct() 0 3 1
A getId() 0 3 1
1
<?php
2
3
namespace Zenstruck\Foundry\Tests\Fixtures\Entity\Cascade;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="review_cascade")
10
 */
11
class Review
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\GeneratedValue
16
     * @ORM\Column(type="integer")
17
     */
18
    private $id;
19
20
    /**
21
     * @ORM\OneToOne(targetEntity=Product::class, inversedBy="review")
22
     */
23
    private $product;
24
25
    /**
26
     * @ORM\Column(type="integer")
27
     */
28
    private $rank;
29
30
    public function getId(): ?int
31
    {
32
        return $this->id;
33
    }
34
35
    public function getProduct(): ?Product
36
    {
37
        return $this->product;
38
    }
39
40
    public function setProduct(Product $product): void
41
    {
42
        $this->product = $product;
43
    }
44
45
    public function getRank(): ?int
46
    {
47
        return $this->rank;
48
    }
49
50
    public function setRank(?int $rank): void
51
    {
52
        $this->rank = $rank;
53
    }
54
}
55