Product::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace App\Entity;
4
5
use App\Repository\ProductRepository;
6
use Doctrine\ORM\Mapping as ORM;
7
8
#[ORM\Entity(repositoryClass: ProductRepository::class)]
9
class Product
10
{
11
    #[ORM\Id]
12
    #[ORM\GeneratedValue]
13
    #[ORM\Column]
14
    /** @phpstan-ignore-next-line */
15
    private ?int $id = null;
16
17
    #[ORM\Column(length: 255)]
18
    private ?string $name = null;
19
20
    #[ORM\Column]
21
    private ?int $value = null;
22
23
    public function getId(): ?int
24
    {
25
        return $this->id;
26
    }
27
28
    public function getName(): ?string
29
    {
30
        return $this->name;
31
    }
32
33
    public function setName(string $name): static
34
    {
35
        $this->name = $name;
36
37
        return $this;
38
    }
39
40
    public function getValue(): ?int
41
    {
42
        return $this->value;
43
    }
44
45
    public function setValue(int $value): static
46
    {
47
        $this->value = $value;
48
49
        return $this;
50
    }
51
}
52