NginxController::actionLetsencrypt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
/**
3
 * HiDev plugin for NGINX
4
 *
5
 * @link      https://github.com/hiqdev/hidev-nginx
6
 * @package   hidev-nginx
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2016-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hidev\nginx\console;
12
13
/**
14
 * NGINX management.
15
 */
16
class NginxController extends \hidev\base\Controller
17
{
18
    public $defaultAction = 'dump';
19
20
    public function actionDump()
21
    {
22
        return $this->getComponent()->dump();
23
    }
24
25
    public function actionDeploy()
26
    {
27
        return $this->getComponent()->deploy();
28
    }
29
30
    public function actionLetsencrypt()
31
    {
32
        return $this->getComponent()->letsencrypt();
33
    }
34
35
    public function actionStart()
36
    {
37
        return $this->getComponent()->start();
38
    }
39
40
    public function actionStop()
41
    {
42
        return $this->getComponent()->stop();
43
    }
44
45
    public function actionReload()
46
    {
47
        return $this->getComponent()->reload();
48
    }
49
50
    public function actionRestart()
51
    {
52
        return $this->getComponent()->restart();
53
    }
54
55
    public function actionStatus()
56
    {
57
        return $this->getComponent()->status();
58
    }
59
60
    public function getComponent()
61
    {
62
        return $this->take('nginx');
63
    }
64
}
65