Volume   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A saveRecord() 0 4 1
A deleteRecord() 0 4 1
1
<?php
2
3
namespace NerdsAndCompany\Schematic\Converters\Base;
4
5
use Craft;
6
use craft\base\Model;
7
use NerdsAndCompany\Schematic\Converters\Models\Base;
8
9
/**
10
 * Schematic Volume Converter.
11
 *
12
 * Sync Craft Setups.
13
 *
14
 * @author    Nerds & Company
15
 * @copyright Copyright (c) 2015-2019, Nerds & Company
16
 * @license   MIT
17
 *
18
 * @see      http://www.nerds.company
19
 */
20
class Volume extends Base
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25 1
    public function saveRecord(Model $record, array $definition): bool
26
    {
27 1
        return Craft::$app->volumes->saveVolume($record);
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 1
    public function deleteRecord(Model $record): bool
34
    {
35 1
        return Craft::$app->volumes->deleteVolume($record);
36
    }
37
}
38