DetachEntities::revert()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
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