Completed
Pull Request — master (#2)
by Korotkov
02:46
created

FootballEvent::getFootballSubject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author    : Korotkov Danila <[email protected]>
7
 * @copyright Copyright (c) 2017, Korotkov Danila
8
 * @license   http://www.gnu.org/licenses/gpl.html GNU GPLv3.0
9
 */
10
11
namespace Behavioral\Observer;
12
13
/**
14
 * Class FootballEvent
15
 *
16
 * @package Behavioral\Observer
17
 */
18
class FootballEvent implements EventInterface
19
{
20
21
    const GOAL = 'Goal!!!';
22
    const MISS = 'missing a ball(((';
23
    const CARD = 'getting a yellow card';
24
25
    /**
26
     * @var string
27
     */
28
    protected $eventName;
29
30
    /**
31
     * FootballEvent constructor.
32
     * @param string $eventName
33
     */
34
    public function __construct(string $eventName)
35
    {
36
        $this->eventName = $eventName;
37
    }
38
39
    /**
40
     * @return string
41
     */
42
    public function getEventName(): string
43
    {
44
        return $this->eventName;
45
    }
46
}
47