Completed
Push — master ( f2e7a7...9c404b )
by Victor
01:52
created

File   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 3
c 4
b 1
f 0
lcom 2
cbo 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLocation() 0 4 1
A getContent() 0 4 1
1
<?php
2
/**
3
 * Created with PHP 5.6 generator
4
 * User: 
5
 * PHP 5.6 generator created by Victor MECH - April 2016
6
*/
7
8
namespace LazyEight\DiTesto\ValueObject;
9
10
11
class File
12
{
13
    /*
14
     * @var FileLocation
15
     */
16
    private $location;
17
    
18
    /*
19
     * @var FileContent
20
     */
21
    private $content;
22
23
    /**
24
     * @param FileLocation $location
25
     * @param FileContent $content
26
     */
27 1
    public function __construct(FileLocation $location, FileContent $content)
28
    {
29 1
        $this->location = $location;
30 1
        $this->content = $content;
31 1
    }
32
	
33
    /**
34
     * @return FileLocation The location of the file on disk
35
     */
36 1
    public function getLocation()
37
    {
38 1
        return clone $this->location;
39
    }
40
41
    /**
42
     * @return FileContent Raw content of the file
43
     */
44 1
    public function getContent()
45
    {
46 1
        return clone $this->content;
47
    }
48
}
49