Connections::getDefaultConnection()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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\craft\salesforce\services;
10
11
use flipbox\craft\integration\services\IntegrationConnections;
12
use flipbox\craft\salesforce\Force;
13
use flipbox\craft\salesforce\records\Connection;
14
use Flipbox\Salesforce\Connections\ConnectionInterface;
15
16
/**
17
 * @author Flipbox Factory <[email protected]>
18
 * @since 1.0.0
19
 */
20
class Connections extends IntegrationConnections
21
{
22
    /**
23
     * The override file
24
     */
25
    public $overrideFile = 'salesforce-connections';
26
27
    /**
28
     * @inheritdoc
29
     */
30
    protected static function tableName(): string
31
    {
32
        return Connection::tableName();
33
    }
34
35
    /**
36
     * @inheritdoc
37
     */
38
    protected static function connectionInstance(): string
39
    {
40
        return ConnectionInterface::class;
41
    }
42
43
    /**
44
     * @inheritdoc
45
     */
46
    protected function getDefaultConnection(): string
47
    {
48
        return Force::getInstance()->getSettings()->getDefaultConnection();
49
    }
50
}
51