ReadmeController   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 14
rs 10
c 0
b 0
f 0
ccs 0
cts 7
cp 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 3 1
A getPath() 0 3 2
1
<?php
2
/**
3
 * README plugin for HiDev
4
 *
5
 * @link      https://github.com/hiqdev/hidev-readme
6
 * @package   hidev-readme
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\readme\console;
12
13
/**
14
 * README file generation.
15
 * @author Andrii Vasyliev <[email protected]>
16
 */
17
class ReadmeController extends \hidev\base\Controller
18
{
19
    public $path;
20
21
    public $type = 'markdown';
22
23
    public function actionIndex()
24
    {
25
        $this->take('readme')->save($this->getPath(), $this->type);
26
    }
27
28
    public function getPath()
29
    {
30
        return $this->path ?: $this->id;
31
    }
32
}
33