ImagableTrait::getPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace DoS\ResourceBundle\Model;
4
5
trait ImagableTrait
6
{
7
    /**
8
     * @var \SplFileInfo
9
     */
10
    protected $file;
11
12
    /**
13
     * @var string
14
     */
15
    protected $path;
16
17
    /**
18
     * @return Boolean
19
     */
20
    public function hasFile()
21
    {
22
        return null !== $this->file;
23
    }
24
25
    /**
26
     * @return null|\SplFileInfo
27
     */
28
    public function getFile()
29
    {
30
        return $this->file;
31
    }
32
33
    /**
34
     * @param null|\SplFileInfo $file
35
     */
36
    public function setFile(\SplFileInfo $file)
37
    {
38
        $this->file = $file;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function hasPath()
45
    {
46
        return null !== $this->path;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getPath()
53
    {
54
        return $this->path;
55
    }
56
57
    /**
58
     * @param string $path
59
     */
60
    public function setPath($path)
61
    {
62
        $this->path = $path;
63
    }
64
}
65