Product   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 42
rs 10
ccs 0
cts 12
cp 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A getName() 0 3 1
A setValue() 0 5 1
A getId() 0 3 1
A setName() 0 5 1
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