PostRemoveEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A aggregate() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Domain\EventSourcing\Event;
12
13
use Cubiche\Domain\EventPublisher\DomainEvent;
14
use Cubiche\Domain\EventSourcing\EventSourcedAggregateRootInterface;
15
16
/**
17
 * PostRemoveEvent class.
18
 *
19
 * @author Ivannis Suárez Jerez <[email protected]>
20
 */
21
class PostRemoveEvent extends DomainEvent
22
{
23
    /**
24
     * @var EventSourcedAggregateRootInterface
25
     */
26
    protected $aggregate;
27
28
    /**
29
     * PrePersistEvent constructor.
30
     *
31
     * @param EventSourcedAggregateRootInterface $aggregate
32
     */
33
    public function __construct(EventSourcedAggregateRootInterface $aggregate)
34
    {
35
        parent::__construct();
36
37
        $this->aggregate = $aggregate;
38
    }
39
40
    /**
41
     * @return EventSourcedAggregateRootInterface
42
     */
43
    public function aggregate()
44
    {
45
        return $this->aggregate;
46
    }
47
}
48