Completed
Push — develop ( 2d4f17...d5975b )
by Nate
05:25
created

Cp   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
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 15
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/hubspot/license
6
 * @link       https://www.flipboxfactory.com/software/hubspot/
7
 */
8
9
namespace flipbox\craft\hubspot\cp;
10
11
use Craft;
12
use flipbox\hubspot\HubSpot;
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 HubSpot $module
21
 */
22
class Cp extends BaseModule
23
{
24
    /**
25
     * @inheritdoc
26
     * @throws NotFoundHttpException
27
     */
28
    public function beforeAction($action)
29
    {
30
        if (!Craft::$app->request->getIsCpRequest()) {
31
            throw new NotFoundHttpException();
32
        }
33
34
        return parent::beforeAction($action);
35
    }
36
}
37