HangmanGameCreatedEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getWord() 0 4 1
1
<?php
2
3
namespace Hangman\Event;
4
5
use Hangman\Event\Util\HangmanBasicResultEvent;
6
use MiniGame\Entity\MiniGameId;
7
8
class HangmanGameCreatedEvent extends HangmanBasicResultEvent
9
{
10
    /**
11
     * @var string
12
     */
13
    const NAME = 'hangman.created';
14
15
    /**
16
     * @var string
17
     */
18
    private $word;
19
20
    /**
21
     * Constructor
22
     *
23
     * @param MiniGameId $gameId
24
     * @param string     $word
25
     */
26 117
    public function __construct(MiniGameId $gameId, $word)
27
    {
28 117
        parent::__construct(self::NAME, $gameId);
29 117
        $this->word = $word;
30 117
    }
31
32
    /**
33
     * @return string
34
     */
35 117
    public function getWord()
36
    {
37 117
        return $this->word;
38
    }
39
}
40