PostPersistListener   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A onPostPersist() 0 6 1
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cubiche\Domain\EventSourcing\Tests\Fixtures\Listener;
12
13
use Cubiche\Domain\EventSourcing\Event\PostPersistEvent;
14
15
/**
16
 * PostPersistListener class.
17
 *
18
 * @author Ivannis Suárez Jerez <[email protected]>
19
 */
20
class PostPersistListener
21
{
22
    /**
23
     * @param PostPersistEvent $event
24
     */
25
    public function onPostPersist(PostPersistEvent $event)
26
    {
27
        $event->aggregate()->setVersion(
28
            $event->aggregate()->version() * 2
29
        );
30
    }
31
}
32