Completed
Push — develop ( 0fe799...8d013c )
by Nate
02:38
created

DefaultConfiguration::save()   A

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 4
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://github.com/flipboxfactory/craft-integration/blob/master/LICENSE
6
 * @link       https://github.com/flipboxfactory/craft-integration/
7
 */
8
9
namespace flipbox\craft\integration\connections;
10
11
use flipbox\craft\integration\records\IntegrationConnection;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.1.0
16
 */
17
class DefaultConfiguration implements ConnectionConfigurationInterface
18
{
19
    /**
20
     * @var IntegrationConnection
21
     */
22
    protected $connection;
23
24
    /**
25
     * @inheritdoc
26
     */
27
    public function __construct(IntegrationConnection $connection)
28
    {
29
        $this->connection = $connection;
30
    }
31
32
    /**
33
     * @inheritdoc
34
     */
35
    public static function displayName(): string
36
    {
37
        return 'Default';
38
    }
39
40
    /**
41
     * @return bool
42
     */
43
    public function save(): bool
44
    {
45
        return $this->connection->save();
46
    }
47
48
    /**
49
     * @return bool
50
     */
51
    public function delete(): bool
52
    {
53
        return $this->connection->delete();
54
    }
55
56
    /**
57
     * @inheritdoc
58
     */
59
    public function getSettingsHtml(): string
60
    {
61
        return '';
62
    }
63
}
64