Event   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
eloc 7
c 2
b 1
f 0
dl 0
loc 38
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getParameters() 0 3 1
A __construct() 0 4 1
A getStateful() 0 3 1
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