Test Failed
Branch develop (ac2838)
by Daniel
09:09
created

FileTrait::getFilePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Silverback\ApiComponentBundle\Entity\Component;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Component\Serializer\Annotation\Groups;
7
8
/**
9
 * Trait FileTrait
10
 * @package Silverback\ApiComponentBundle\Entity\Component
11
 */
12
trait FileTrait
13
{
14
    /**
15
     * @ORM\Column(type="string", nullable=false)
16
     * @Groups({"component"})
17
     * @var null|string
18
     */
19
    protected $filePath;
20
21
    /**
22
     * @return null|string
23
     */
24
    public function getFilePath(): ?string
25
    {
26
        return $this->filePath;
27
    }
28
29
    /**
30
     * @param null|string $filePath
31
     */
32
    public function setFilePath(?string $filePath): void
33
    {
34
        $this->filePath = $filePath;
35
    }
36
37
    public static function getImagineFilters(): array
38
    {
39
        return [
40
            'thumbnailPath' => 'thumbnail',
41
            'placeholderPath' => 'placeholder_square'
42
        ];
43
    }
44
}
45