CreditWorkLog   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A processClass() 0 3 1
A slugBehaviorConfig() 0 5 1
1
<?php
2
3
namespace app\api\models;
4
5
use app\models as base;
6
use roaresearch\yii2\roa\hal\{Contract, ContractTrait};
7
8
/**
9
 * ROA contract to handle credit_worklog records.
10
 */
11
class CreditWorkLog extends base\CreditWorkLog implements Contract
12
{
13
    use ContractTrait;
14
15
    /**
16
     * @inheritdoc
17
     */
18
    protected function processClass(): string
19
    {
20
        return Credit::class;
21
    }
22
23
    /**
24
     * @inheritdoc
25
     */
26
    protected function slugBehaviorConfig(): array
27
    {
28
        return [
29
            'resourceName' => 'worklog',
30
            'parentSlugRelation' => 'process'
31
        ];
32
    }
33
}
34