Completed
Push — master ( b3b6d3...2114de )
by Andrii
08:18
created

ReadmeMarkdownController   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 33.33%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 2
dl 0
loc 28
ccs 2
cts 6
cp 0.3333
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTemplate() 0 4 1
A getTwig() 0 4 1
A getReadme() 0 4 1
1
<?php
2
3
/*
4
 * README plugin for HiDev
5
 *
6
 * @link      https://github.com/hiqdev/hidev-readme
7
 * @package   hidev-readme
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hidev\readme\controllers;
13
14
/**
15
 * Goal for README.md file generation.
16
 * @author Andrii Vasyliev <[email protected]>
17
 */
18
class ReadmeMarkdownController extends \hidev\controllers\TemplateController
19
{
20
    /**
21
     * {@inheritdoc}
22
     */
23 2
    public function getTemplate()
24
    {
25 2
        return 'readme-md';
26
    }
27
28
    /**
29
     * Twig getter.
30
     * @return \Twig_Environment
31
     */
32
    public function getTwig()
33
    {
34
        return $this->getReadme()->getTwig();
35
    }
36
37
    /**
38
     * Readme goal getter.
39
     * @return ReadmeController
40
     */
41
    public function getReadme()
42
    {
43
        return $this->takeGoal('readme');
44
    }
45
}
46