Completed
Push — master ( e219aa...e1fcb3 )
by Nate
06:24 queued 05:08
created

Associate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 12
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://flipboxfactory.com/software/domains/license
6
 * @link       https://www.flipboxfactory.com/software/domains/
7
 */
8
9
namespace flipbox\domains\actions;
10
11
use flipbox\craft\sortable\associations\records\SortableAssociationInterface;
12
use flipbox\domains\Domains;
13
use yii\base\Model;
14
15
/**
16
 * @author Flipbox Factory <[email protected]>
17
 * @since  1.0.0
18
 */
19
class Associate extends Action
20
{
21
    /**
22
     * @param Model|SortableAssociationInterface $model
23
     * @return bool
24
     * @throws \Exception
25
     */
26
    protected function performAction(Model $model): bool
27
    {
28
        return Domains::getInstance()->getAssociations()->associate($model);
29
    }
30
}
31