Completed
Push — master ( 9b9083...4534a2 )
by Johannes
02:11
created

BlogEntry   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 getId() 0 4 1
A getTitle() 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;
11
12
/**
13
 * Entity for blog posts
14
 */
15
class BlogEntry
16
{
17
    /**
18
     * Id
19
     *
20
     * @var string
21
     */
22
    private $id;
23
24
    /**
25
     * Title
26
     *
27
     * @var string
28
     */
29
    private $title;
30
31
    /**
32
     * Constructor
33
     *
34
     * @param string $id
35
     * @param string $title
36
     */
37
    public function __construct(string $id, string $title)
38
    {
39
        $this->id = $id;
40
        $this->title = $title;
41
    }
42
43
    /**
44
     * Get id
45
     *
46
     * @return string
47
     */
48
    public function getId() : string
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * Get title
55
     *
56
     * @return string
57
     */
58
    public function getTitle() : string
59
    {
60
        return $this->title;
61
    }
62
}