BadgeUnlockEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBadgeCompletion() 0 4 1
1
<?php
2
3
namespace Badger\Bundle\GameBundle\Event;
4
5
use Badger\Component\Game\Model\BadgeCompletionInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * This event is dispatched when a User unlocked a Badge.
10
 *
11
 * @author  Adrien Pétremann <[email protected]>
12
 * @license http://opensource.org/licenses/MIT The MIT License (MIT)
13
 */
14
class BadgeUnlockEvent extends Event
15
{
16
    /** @var BadgeCompletionInterface */
17
    protected $badgeCompletion;
18
19
    /**
20
     * @param BadgeCompletionInterface $badgeCompletion
21
     */
22
    public function __construct(BadgeCompletionInterface $badgeCompletion)
23
    {
24
        $this->badgeCompletion = $badgeCompletion;
25
    }
26
27
    /**
28
     * @return BadgeCompletionInterface
29
     */
30
    public function getBadgeCompletion()
31
    {
32
        return $this->badgeCompletion;
33
    }
34
}
35