Product::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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
/**
10
 * @ORM\Entity(repositoryClass=App\Repository\ProductRepository::class)
11
 */
12
class Product
13
{
14
    #[ORM\Id]
15
    #[ORM\GeneratedValue]
16
    #[ORM\Column]
17
    // @phpstan-ignore-next-line
18
    private ?int $id = null;
19
20
    #[ORM\Column(length: 255)]
21
    private ?string $name = null;
22
23
    #[ORM\Column]
24
    private ?int $value = null;
25
26
    /**
27
     * getId.
28
     */
29 6
    public function getId(): ?int
30
    {
31 6
        return $this->id;
32
    }
33
34
    /**
35
     * getName.
36
     */
37 5
    public function getName(): ?string
38
    {
39 5
        return $this->name;
40
    }
41
42
    /**
43
     * setName.
44
     */
45 4
    public function setName(string $name): static
46
    {
47 4
        $this->name = $name;
48
49 4
        return $this;
50
    }
51
52
    /**
53
     * getValue.
54
     */
55 6
    public function getValue(): ?int
56
    {
57 6
        return $this->value;
58
    }
59
60
    /**
61
     * setValue.
62
     */
63 5
    public function setValue(int $value): static
64
    {
65 5
        $this->value = $value;
66
67 5
        return $this;
68
    }
69
}
70