Event::getParameters()   A
last analyzed

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
/**
3
 * @author: RunnerLee
4
 * @email: [email protected]
5
 * @time: 2018-02
6
 */
7
8
namespace Runner\Heshen\Event;
9
10
use Runner\Heshen\Contracts\StatefulInterface;
11
use Symfony\Component\EventDispatcher\Event as BaseEvent;
12
13
class Event extends BaseEvent
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

13
class Event extends /** @scrutinizer ignore-deprecated */ BaseEvent
Loading history...
14
{
15
    /**
16
     * @var StatefulInterface
17
     */
18
    protected $stateful;
19
20
    /**
21
     * @var array
22
     */
23
    protected $parameters;
24
25
    /**
26
     * Event constructor.
27
     *
28
     * @param StatefulInterface $stateful
29
     * @param array             $parameters
30
     */
31 2
    public function __construct(StatefulInterface $stateful, array $parameters = [])
32
    {
33 2
        $this->stateful = $stateful;
34 2
        $this->parameters = $parameters;
35 2
    }
36
37
    /**
38
     * @return StatefulInterface
39
     */
40 1
    public function getStateful(): StatefulInterface
41
    {
42 1
        return $this->stateful;
43
    }
44
45
    /**
46
     * @return array
47
     */
48 1
    public function getParameters(): array
49
    {
50 1
        return $this->parameters;
51
    }
52
}
53