Product::setName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
ccs 0
cts 3
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
    private ?int $id = null;
15
16
    #[ORM\Column(length: 255)]
17
    private ?string $name = null;
18
19
    #[ORM\Column]
20
    private ?int $value = null;
21
22
    public function getId(): ?int
23
    {
24
        return $this->id;
25
    }
26
27
    public function getName(): ?string
28
    {
29
        return $this->name;
30
    }
31
32
    public function setName(string $name): static
33
    {
34
        $this->name = $name;
35
36
        return $this;
37
    }
38
39
    public function getValue(): ?int
40
    {
41
        return $this->value;
42
    }
43
44
    public function setValue(int $value): static
45
    {
46
        $this->value = $value;
47
48
        return $this;
49
    }
50
}
51