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

AbstractFileContent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 71.43%

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 3
c 3
b 1
f 0
lcom 1
cbo 1
dl 0
loc 32
ccs 5
cts 7
cp 0.7143
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 4 1
A __construct() 0 4 1
A getValue() 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
use LazyEight\BasicTypes\Interfaces\ValueObjectInterface;
12
use LazyEight\BasicTypes\Stringy;
13
14
abstract class AbstractFileContent implements ValueObjectInterface
15
{
16
    /*
17
     * @var ValueObjectInterface
18
     */
19
    protected $content;
20
21
    /**
22
     * @param Stringy $content
23
     */
24 3
    public function __construct(Stringy $content)
25
    {
26 3
        $this->content = $content;
27 3
    }
28
29
    /**
30
     * @return Stringy Raw content
31
     */
32 3
    public function getValue()
33
    {
34 3
        return clone $this->content;
35
    }
36
	
37
    /**
38
     * @return string
39
     */
40
    public function __toString()
41
    {
42
        return $this->content->getValue();
43
    }
44
	
45
}
46