Completed
Push — feature/admin-avatar ( e274c7 )
by Loïc
03:49
created

File::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of AppName.
5
 *
6
 * (c) Monofony
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace App\Entity\Media;
15
16
use App\Entity\IdentifiableTrait;
17
use Doctrine\ORM\Mapping as ORM;
18
use Sylius\Component\Resource\Model\ResourceInterface;
19
use Symfony\Component\Serializer\Annotation as Serializer;
20
21
/**
22
 * @ORM\MappedSuperclass
23
 */
24
abstract class File implements ResourceInterface
25
{
26
    use IdentifiableTrait;
27
28
    /** @var \SplFileInfo|null */
29
    protected $file;
30
31
    /**
32
     * @var string|null
33
     *
34
     * @ORM\Column(type="string")
35
     *
36
     * @Serializer\Groups({"Default", "Detailed"})
37
     */
38
    protected $path;
39
40
    /**
41
     * @var string|null
42
     *
43
     * @ORM\Column(type="string", nullable=true)
44
     */
45
    protected $type;
46
47
    public function getFile(): ?\SplFileInfo
48
    {
49
        return $this->file;
50
    }
51
52
    public function setFile(?\SplFileInfo $file): void
53
    {
54
        $this->file = $file;
55
    }
56
57
    public function getPath(): ?string
58
    {
59
        return $this->path;
60
    }
61
62
    public function setPath(?string $path): void
63
    {
64
        $this->path = $path;
65
    }
66
67
    public function getType(): ?string
68
    {
69
        return $this->type;
70
    }
71
72
    public function setType(?string $type): void
73
    {
74
        $this->type = $type;
75
    }
76
}
77