Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
PaymentMethod
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getName
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setName
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Entity;
6
7use App\Repository\PaymentMethodRepository;
8use Doctrine\ORM\Mapping\Column;
9use Doctrine\ORM\Mapping\Entity;
10use Doctrine\ORM\Mapping\GeneratedValue;
11use Doctrine\ORM\Mapping\Id;
12use Symfony\Component\Validator\Constraints\NotBlank;
13
14#[Entity(repositoryClass: PaymentMethodRepository::class)]
15class PaymentMethod
16{
17    #[Column, Id, GeneratedValue]
18    private ?int $id = null;
19
20    #[Column(length: 150, nullable: false), NotBlank]
21    private ?string $name = 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): self
34    {
35        $this->name = $name;
36
37        return $this;
38    }
39}