DetachEntities   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A revert() 0 2 1
A onSuccess() 0 3 1
A run() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Orm\Action;
5
6
use Sirius\Orm\Entity\EntityInterface;
7
use Sirius\Orm\Relation\Relation;
8
9
class DetachEntities extends AttachEntities
10
{
11
    public function revert()
12
    {
13
        /**
14
         * @todo restore previous values
15
         */
16
    }
17
18
    public function run()
19
    {
20
        /**
21
         * @todo store current attribute values
22
         */
23
    }
24
25
    public function onSuccess()
26
    {
27
        $this->relation->detachEntities($this->nativeEntity, $this->foreignEntity);
28
    }
29
}
30