Completed
Push — master ( c4148d...4cccaa )
by Korotkov
03:01 queued 11s
created

FootballEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 6
Bugs 0 Features 0
Metric Value
eloc 7
c 6
b 0
f 0
dl 0
loc 26
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getEventName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @author  : Jagepard <[email protected]>
7
 * @license https://mit-license.org/ MIT
8
 */
9
10
namespace Behavioral\Observer;
11
12
class FootballEvent implements EventInterface
13
{
14
    const GOAL = 'Goal!!!';
15
    const MISS = 'missing a ball(((';
16
    const VIOLATION = 'getting a yellow card';
17
18
    /**
19
     * @var string
20
     */
21
    private $eventName;
22
23
    /**
24
     * FootballEvent constructor.
25
     * @param  string  $eventName
26
     */
27
    public function __construct(string $eventName)
28
    {
29
        $this->eventName = $eventName;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getEventName(): string
36
    {
37
        return $this->eventName;
38
    }
39
}
40