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

BaseInfoListener   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 9 1
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