ThumbnailTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 6
c 1
b 0
f 0
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setThumbnail() 0 3 1
A getThumbnail() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\CoreBundle\Traits\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
trait ThumbnailTrait
11
{
12
    #[Assert\Length(max: 255)]
13
    #[ORM\Column(length: 255, nullable: true)]
14
    private ?string $thumbnail;
15
16
    public function setThumbnail(?string $thumbnail): void
17
    {
18
        $this->thumbnail = $thumbnail;
19
    }
20
21
    public function getThumbnail(): ?string
22
    {
23
        return $this->thumbnail;
24
    }
25
}
26