Passed
Branch latest (76d169)
by Colin
01:59
created

ListenerData::getListener()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the league/commonmark package.
7
 *
8
 * (c) Colin O'Dell <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace League\CommonMark\Event;
15
16
/**
17
 * @internal
18
 *
19
 * @psalm-immutable
20
 */
21
final class ListenerData
22
{
23
    /** @var string */
24
    private $event;
25
26
    /** @var callable */
27
    private $listener;
28
29 606
    public function __construct(string $event, callable $listener)
30
    {
31 606
        $this->event    = $event;
32 606
        $this->listener = $listener;
33 606
    }
34
35 600
    public function getEvent(): string
36
    {
37 600
        return $this->event;
38
    }
39
40 600
    public function getListener(): callable
41
    {
42 600
        return $this->listener;
43
    }
44
}
45