Completed
Pull Request — experimental/3.1 (#2346)
by chihiro
119:30
created

BaseInfoListener::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace Plugin\EntityEvent\Entity;
4
5
use Doctrine\ORM\Event\LifecycleEventArgs;
6
use Doctrine\ORM\Event\PreUpdateEventArgs;
7
use Eccube\Annotation\PreUpdate;
8
use Eccube\Entity\Event\EntityEventListener;
9
10
/**
11
 * @PreUpdate("Eccube\Entity\BaseInfo")
12
 */
13
class BaseInfoListener implements EntityEventListener
14
{
15
    public function execute(LifecycleEventArgs $eventArgs)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
16
    {
17
        /** @var PreUpdateEventArgs $eventArgs */
18
        $new = $eventArgs->getNewValue('company_name');
19
        $old = $eventArgs->getOldValue('company_name');
20
21
        error_log($new);
22
        error_log($old);
23
    }
24
}
25