Extension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGlobals() 0 6 1
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\craft\salesforce\web\twig;
10
11
use Craft;
12
use flipbox\craft\salesforce\web\twig\variables\Force;
13
use Twig\Extension\AbstractExtension;
14
use Twig\Extension\GlobalsInterface;
15
16
/**
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 1.2.0
19
 */
20
class Extension extends AbstractExtension implements GlobalsInterface
21
{
22
    /**
23
     * @return array
24
     * @throws \yii\base\InvalidConfigException
25
     */
26
    public function getGlobals(): array
27
    {
28
        return [
29
            'salesforce' => Craft::createObject(Force::class)
30
        ];
31
    }
32
}
33