Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
85.71% |
6 / 7 |
|
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
CRAP | |
0.00% |
0 / 1 |
| Parameter | |
85.71% |
6 / 7 |
|
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
|
80.00% |
4 / 5 |
5.20 | |
0.00% |
0 / 1 |
| getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setName | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getValue | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setValue | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Entity; |
| 4 | |
| 5 | use App\Repository\ParameterRepository; |
| 6 | use Doctrine\DBAL\Types\Types; |
| 7 | use Doctrine\ORM\Mapping as ORM; |
| 8 | use Symfony\Component\Validator\Constraints as Assert; |
| 9 | |
| 10 | #[ORM\Entity(repositoryClass: ParameterRepository::class)] |
| 11 | class Parameter |
| 12 | { |
| 13 | #[ORM\Id] |
| 14 | #[ORM\GeneratedValue] |
| 15 | #[ORM\Column] |
| 16 | private ?int $id = null; |
| 17 | |
| 18 | #[ORM\Column(length: 255)] |
| 19 | #[Assert\Length( |
| 20 | min: 1, |
| 21 | max: 255)] |
| 22 | private string $name; |
| 23 | |
| 24 | #[ORM\Column(type: Types::TEXT, nullable: true)] |
| 25 | private ?string $value = null; |
| 26 | |
| 27 | public function getId(): ?int |
| 28 | { |
| 29 | return $this->id; |
| 30 | } |
| 31 | |
| 32 | public function getName(): ?string |
| 33 | { |
| 34 | return $this->name; |
| 35 | } |
| 36 | |
| 37 | public function setName(string $name): static |
| 38 | { |
| 39 | $this->name = $name; |
| 40 | |
| 41 | return $this; |
| 42 | } |
| 43 | |
| 44 | public function getValue(): ?string |
| 45 | { |
| 46 | return $this->value; |
| 47 | } |
| 48 | |
| 49 | public function setValue(string $value): static |
| 50 | { |
| 51 | $this->value = $value; |
| 52 | |
| 53 | return $this; |
| 54 | } |
| 55 | } |
Below are the source code lines that represent each code branch as identified by Xdebug. Please note a branch is not
necessarily coterminous with a line, a line may contain multiple branches and therefore show up more than once.
Please also be aware that some branches may be implicit rather than explicit, e.g. an if statement
always has an else as part of its logical flow even if you didn't write one.
| 29 | return $this->id; |
| 30 | } |
| 34 | return $this->name; |
| 35 | } |
| 46 | return $this->value; |
| 47 | } |
| 37 | public function setName(string $name): static |
| 38 | { |
| 39 | $this->name = $name; |
| 40 | |
| 41 | return $this; |
| 42 | } |
| 49 | public function setValue(string $value): static |
| 50 | { |
| 51 | $this->value = $value; |
| 52 | |
| 53 | return $this; |
| 54 | } |