Trigger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 16
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 10 2
1
<?php
2
3
namespace flipbox\twig;
4
5
use Craft;
6
use craft\base\Plugin;
7
8
class Trigger extends Plugin
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public function init()
14
    {
15
        parent::init();
16
17
        // Add in our Twig extensions
18
        $twig = Craft::$app->getView()->getTwig();
19
        if (!$twig->hasExtension(TriggerExtension::class)) {
20
            $twig->addExtension(new TriggerExtension());
21
        }
22
    }
23
}
24