Completed
Push — master ( 4534a2...4c3ec3 )
by Johannes
03:54
created

MarkdownDocument   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 48
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getParams() 0 4 1
A getContent() 0 4 1
1
<?php
2
/**
3
 * Lichtenwallner  (https://lichtenwallner.at)
4
 *
5
 * @see https://github.com/jolicht/markdown-cms for the canonical source repository
6
 * @license https://github.com/jolicht/markdown-cms/blob/master/LICENSE MIT
7
 * @copyright Copyright (c) Johannes Lichtenwallner
8
 */
9
declare(strict_types = 1);
10
namespace Jolicht\MarkdownCms\Markdown;
11
12
/**
13
 * Markdown document
14
 *
15
 * providing yaml params and content of markdown document
16
 */
17
class MarkdownDocument
18
{
19
    /**
20
     * Params
21
     *
22
     * @var array
23
     */
24
    private $params;
25
26
    /**
27
     * Content
28
     *
29
     * @var string
30
     */
31
    private $content;
32
33
    /**
34
     * Constructor
35
     *
36
     * @param array $params
37
     * @param string $content
38
     */
39
    public function __construct(array $params, string $content)
40
    {
41
        $this->params = $params;
42
        $this->content = $content;
43
    }
44
45
    /**
46
     * Get params
47
     *
48
     * @return array
49
     */
50
    public function getParams()
51
    {
52
        return $this->params;
53
    }
54
55
    /**
56
     * Get content
57
     *
58
     * @return string
59
     */
60
    public function getContent()
61
    {
62
        return $this->content;
63
    }
64
}