Completed
Push — master ( 1b355d...2cadce )
by Andrii
02:27
created

MarkdownRenderer::addLinks()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * Changelog keeper
5
 *
6
 * @link      https://github.com/hiqdev/chkipper
7
 * @package   chkipper
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\chkipper\changelog;
13
14
use hiqdev\chkipper\history\Note;
15
16
/**
17
 * Markdown changelog renderer.
18
 *
19
 * @author Andrii Vasyliev <[email protected]>
20
 */
21
class MarkdownRenderer extends \hiqdev\chkipper\history\MarkdownRenderer
22
{
23
24
    public function renderNote(Note $note)
25
    {
26
        return $this->renderNoteHead($note);
27
    }
28
29
    public function addLinks()
30
    {
31
        /// no links added for CHANGELOG
32
    }
33
34
    public function removeCommitLinks()
35
    {
36
        $history = $this->getHistory();
37
        foreach ($history->getHashes() as $hash) {
38
            $history->removeLink($hash);
39
        }
40
    }
41
}
42