Completed
Push — master ( 11971b...eeafb3 )
by Nate
01:16
created

DeleteRecord   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A performAction() 0 4 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://github.com/flipboxfactory/craft-ember/blob/master/LICENSE
6
 * @link       https://github.com/flipboxfactory/craft-ember/
7
 */
8
9
namespace flipbox\craft\ember\actions\records;
10
11
use yii\base\Action;
12
use yii\db\ActiveRecord;
13
14
/**
15
 * @author Flipbox Factory <[email protected]>
16
 * @since 2.0.0
17
 */
18
abstract class DeleteRecord extends Action
19
{
20
    use DeleteRecordTrait, LookupRecordTrait;
21
22
    /**
23
     * @param ActiveRecord $record
24
     * @return bool
25
     * @throws \Throwable
26
     * @throws \yii\db\StaleObjectException
27
     */
28
    protected function performAction(ActiveRecord $record): bool
29
    {
30
        return $record->delete();
31
    }
32
}
33