Test Failed
Pull Request — master (#3)
by
unknown
07:14
created

WorkflowResource   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 21
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A actions() 0 6 1
1
<?php
2
3
namespace roaresearch\yii2\workflow\roa\resources;
4
5
use roaresearch\yii2\roa\{actions\SoftDelete, controllers\Resource};
6
use roaresearch\yii2\workflow\roa\models\{Workflow, WorkflowSearch};
7
8
/**
9
 * Resource to handle `Workflow` records
10
 *
11
 * @author Angel (Faryshta) Guevara <[email protected]>
12
 */
13
class WorkflowResource extends Resource
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    public $modelClass = Workflow::class;
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public $searchClass = WorkflowSearch::class;
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function actions()
29
    {
30
        $actions = parent::actions();
31
        $actions['delete']['class'] = SoftDelete::class;
32
33
        return $actions;
34
    }
35
}
36