Completed
Push — develop ( f37ae4...1d947e )
by Nate
18:30
created

Cp   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A beforeAction() 0 8 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/force/license
6
 * @link       https://www.flipboxfactory.com/software/force/
7
 */
8
9
namespace flipbox\hubspot\cp;
10
11
use Craft;
12
use flipbox\force\Force;
13
use yii\base\Module as BaseModule;
14
use yii\web\NotFoundHttpException;
15
16
/**
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 1.0.0
19
 *
20
 * @property Force $module
21
 */
22
class Cp extends BaseModule
23
{
24
    /**
25
     * @inheritdoc
26
     */
27
    public function beforeAction($action)
28
    {
29
        if (!Craft::$app->request->getIsCpRequest()) {
30
            throw new NotFoundHttpException();
31
        }
32
33
        return parent::beforeAction($action);
34
    }
35
}
36