NginxController   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 47
rs 10
ccs 0
cts 18
cp 0
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A actionReload() 0 3 1
A actionDump() 0 3 1
A actionStatus() 0 3 1
A actionRestart() 0 3 1
A getComponent() 0 3 1
A actionStart() 0 3 1
A actionStop() 0 3 1
A actionLetsencrypt() 0 3 1
A actionDeploy() 0 3 1
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