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

File::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 4
Bugs 1 Features 0
Metric Value
c 4
b 1
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 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