Completed
Push — develop ( fbdd82...317691 )
by Mike
09:29
created

Artefact   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A location() 0 4 1
A content() 0 4 1
1
<?php
2
/**
3
 * This file is part of phpDocumentor.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @copyright 2010-2016 Mike van Riel<[email protected]>
9
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
10
 * @link      http://phpdoc.org
11
 */
12
13
namespace phpDocumentor\DomainModel\Renderer;
14
15
use phpDocumentor\DomainModel\Path;
16
17
/**
18
 * A single piece of output generated by the Renderer such as a HTML page or PDF.
19
 */
20
final class Artefact
21
{
22
    /** @var Path Where to store the Artefact relative to the destination specified to the renderer */
23
    private $location;
24
25
    /** @var string the contents of this artefact */
26
    private $content;
27
28
    /**
29
     * @param Path $location
30
     * @param string $content
31
     */
32
    public function __construct(Path $location, $content)
33
    {
34
        $this->location = $location;
35
        $this->content = $content;
36
    }
37
38
    /**
39
     * Returns the location where this artefact is supposed to be stored relative.
40
     *
41
     * @return Path
42
     */
43
    public function location()
44
    {
45
        return $this->location;
46
    }
47
48
    /**
49
     * Returns the artefact's contents.
50
     *
51
     * @return string
52
     */
53
    public function content()
54
    {
55
        return $this->content;
56
    }
57
}
58