Completed
Push — master ( b09517...57901d )
by
unknown
18:40
created

AbstractController::addUrls()   C

Complexity

Conditions 10
Paths 5

Size

Total Lines 67

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 67
rs 6.8533
c 0
b 0
f 0
cc 10
nc 5
nop 1

How to fix   Long Method    Complexity   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: dsmrt
5
 * Date: 3/9/18
6
 * Time: 2:48 PM
7
 */
8
9
namespace flipbox\saml\core\controllers\cp\view;
10
11
use flipbox\saml\core\AbstractPlugin;
12
use flipbox\saml\core\controllers\AbstractController as BaseController;
13
use flipbox\saml\core\EnsureSAMLPlugin;
14
use flipbox\saml\core\models\AbstractSettings;
15
use flipbox\saml\core\records\ProviderInterface;
16
use flipbox\saml\core\web\assets\bundles\SamlCore;
17
use SAML2\XML\md\EndpointType;
18
use SAML2\XML\md\IDPSSODescriptor;
19
use SAML2\XML\md\IndexedEndpointType;
20
use SAML2\XML\md\SPSSODescriptor;
21
22
/**
23
 * Class AbstractController
24
 * @package flipbox\saml\core\controllers\cp\view
25
 */
26
abstract class AbstractController extends BaseController implements EnsureSAMLPlugin
27
{
28
29
    const TEMPLATE_INDEX = DIRECTORY_SEPARATOR . '_cp';
30
31
    /**
32
     * @throws \yii\base\InvalidConfigException
33
     */
34
    public function init()
35
    {
36
        parent::init();
37
        \Craft::$app->view->registerAssetBundle(
38
            SamlCore::class
39
        );
40
    }
41
}
42