User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A publish() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the BenGorUser package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace BenGorUser\CarlosBuenosvinosDddBridge\Domain\Model;
14
15
use BenGorUser\User\Domain\Model\Event\UserEvent as BaseUserEvent;
16
use BenGorUser\User\Domain\Model\User as BaseUser;
17
use Ddd\Domain\DomainEventPublisher;
18
19
/**
20
 * User domain class.
21
 *
22
 * @author Beñat Espiña <[email protected]>
23
 */
24
class User extends BaseUser
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29
    protected function publish(BaseUserEvent $anEvent)
30
    {
31
        DomainEventPublisher::instance()->publish(
32
            new UserEvent($anEvent)
33
        );
34
    }
35
}
36