ImagableTrait   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 6
c 2
b 1
f 1
lcom 2
cbo 0
dl 0
loc 60
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A hasFile() 0 4 1
A getFile() 0 4 1
A setFile() 0 4 1
A hasPath() 0 4 1
A getPath() 0 4 1
A setPath() 0 4 1
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